qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Sascha Silbe <silbe@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>
Cc: Tu Bo <tubo@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO
Date: Wed, 6 Apr 2016 18:15:45 +0200	[thread overview]
Message-ID: <57053631.5010009@redhat.com> (raw)
In-Reply-To: <1459848109-29756-7-git-send-email-silbe@linux.vnet.ibm.com>


[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]

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.
> 
> 141 is inherently racy, but we can at least reduce the likelihood of the
> 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

> 
> 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.
> 
> Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
> Reviewed-by: Bo Tu <tubo@linux.vnet.ibm.com>
> ---
>  tests/qemu-iotests/141           | 11 ++++++-----
>  tests/qemu-iotests/141.out       | 24 ++++++++++++------------
>  tests/qemu-iotests/common.filter |  1 +
>  3 files changed, 19 insertions(+), 17 deletions(-)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-04-06 16:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  9:21 [Qemu-devel] [PATCH 0/7] next round of qemu-iotests fixes Sascha Silbe
2016-04-05  9:21 ` [Qemu-devel] [PATCH 1/7] qemu-iotests: check: don't place files with predictable names in /tmp Sascha Silbe
2016-04-06 15:36   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-07 19:54     ` Sascha Silbe
2016-04-05  9:21 ` [Qemu-devel] [PATCH 2/7] qemu-iotests: fix 051 on non-PC architectures Sascha Silbe
2016-04-06 15:43   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-05  9:21 ` [Qemu-devel] [PATCH 3/7] qemu-iotests: iotests.VM: remove qtest socket on error Sascha Silbe
2016-04-06 15:55   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-07 19:58     ` Sascha Silbe
2016-04-05  9:21 ` [Qemu-devel] [PATCH 4/7] qemu-iotests: 148: properly skip test if quorum support is missing Sascha Silbe
2016-04-06 16:04   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-05  9:21 ` [Qemu-devel] [PATCH 5/7] qemu-iotests: 068: don't require KVM Sascha Silbe
2016-04-06 16:12   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-05  9:21 ` [Qemu-devel] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO Sascha Silbe
2016-04-06 16:15   ` Max Reitz [this message]
2016-04-06 16:30     ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-04-07 20:27     ` Sascha Silbe
2016-04-08 11:11       ` Kevin Wolf
2016-04-08 12:01       ` Sascha Silbe
2016-04-08 12:31         ` Kevin Wolf
2016-04-08 13:46           ` Sascha Silbe
2016-04-05  9:21 ` [Qemu-devel] [PATCH 7/7] qemu-iotests: iotests.py: get rid of __all__ Sascha Silbe
2016-04-06 16:18   ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-04-08 14:49 ` [Qemu-devel] [Qemu-block] [PATCH 0/7] next round of qemu-iotests fixes Max Reitz
2016-04-08 17:17   ` Sascha Silbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57053631.5010009@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=silbe@linux.vnet.ibm.com \
    --cc=tubo@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).