From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anq7Y-0001uf-4l for qemu-devel@nongnu.org; Wed, 06 Apr 2016 12:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anq7X-0002YS-8R for qemu-devel@nongnu.org; Wed, 06 Apr 2016 12:15:56 -0400 References: <1459848109-29756-1-git-send-email-silbe@linux.vnet.ibm.com> <1459848109-29756-7-git-send-email-silbe@linux.vnet.ibm.com> From: Max Reitz Message-ID: <57053631.5010009@redhat.com> Date: Wed, 6 Apr 2016 18:15:45 +0200 MIME-Version: 1.0 In-Reply-To: <1459848109-29756-7-git-send-email-silbe@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vpPsrxEtA5knJWHXkWig0K1v54hAWbuUU" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sascha Silbe , qemu-devel@nongnu.org, qemu-block@nongnu.org, Kevin Wolf Cc: Tu Bo This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vpPsrxEtA5knJWHXkWig0K1v54hAWbuUU Content-Type: multipart/mixed; boundary="KEWeql2W1JMB8TNilMISxkFM8a5dgR2MA" From: Max Reitz To: Sascha Silbe , qemu-devel@nongnu.org, qemu-block@nongnu.org, Kevin Wolf Cc: Tu Bo Message-ID: <57053631.5010009@redhat.com> Subject: Re: [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO References: <1459848109-29756-1-git-send-email-silbe@linux.vnet.ibm.com> <1459848109-29756-7-git-send-email-silbe@linux.vnet.ibm.com> In-Reply-To: <1459848109-29756-7-git-send-email-silbe@linux.vnet.ibm.com> --KEWeql2W1JMB8TNilMISxkFM8a5dgR2MA Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 05.04.2016 11:21, Sascha Silbe wrote: > On systems with fast IO, qemu-io may write more than 1 MiB before > receiving the block-job-cancel command, causing the test case to fail. >=20 > 141 is inherently racy, but we can at least reduce the likelihood of th= e > job completing before the cancel command arrives by bumping the size of= > the data getting written; we'll try 32 MiB for a start. Hm, interesting. I tried to prevent this by setting the block jobs' speed to 1, which should make it stop after the block job has processed the first block of data. I won't oppose this patch, because if it fixes things for you, that's good. But I don't think it should be necessary. Max >=20 > Once we actually move enough data around for the block job not to > complete prematurely, the test will still fail because the offset value= > in the BLOCK_JOB_CANCELLED event will vary. Since this is more or less > inherent to the nature of this event, we just replace it with a fixed > value globally (in _filter_qmp), the same way we handle timestamps. >=20 > Signed-off-by: Sascha Silbe > Reviewed-by: Bo Tu > --- > tests/qemu-iotests/141 | 11 ++++++----- > tests/qemu-iotests/141.out | 24 ++++++++++++------------ > tests/qemu-iotests/common.filter | 1 + > 3 files changed, 19 insertions(+), 17 deletions(-) --KEWeql2W1JMB8TNilMISxkFM8a5dgR2MA-- --vpPsrxEtA5knJWHXkWig0K1v54hAWbuUU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXBTYxAAoJEDuxQgLoOKyteiAIAJC+KfyKp3oqGt20jz4X7Ge/ C9Ke/1Y1wplSKZfN+V7mixAytzbfupzaf+e5k5xznd1FYmRv769ubXTVZD3WGMER NHeVBMmT4hbkfzytwJF/uZ3WeHkiIY9K9jW24wCvQJArLsBVvL63QP8hh54XwUfN 7WxLKgYXoMFJ2nmoswlmJj0RygfQzlWxYxT6YMfGRZUnnanHByfxW+h3K58NLBmX 0KSQemPTi3fWqpZLzCU+hEhA6RE5Cj3mlL2bsSkkvE5A9mCINsUzKRqYdgbVgPco nw5TfcZDUcVtRfEtx9GjKx0V97stJAx20Eb7jF443mRVOiX4X4eTB/JwzkJQcCw= =b5Tm -----END PGP SIGNATURE----- --vpPsrxEtA5knJWHXkWig0K1v54hAWbuUU--