qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	andrey@xdel.ru, Fam Zheng <famz@redhat.com>,
	sviatoslav.pestov@gmail.com
Subject: Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases
Date: Wed, 30 Jul 2014 05:19:16 -0600	[thread overview]
Message-ID: <53D8D4B4.8060208@redhat.com> (raw)
In-Reply-To: <1406710411-26373-3-git-send-email-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

On 07/30/2014 02:53 AM, Stefan Hajnoczi wrote:
> This test case covers the basic bdrv_aio_multiwrite() scenarios:
> 1. Single request
> 2. Sequential requests (AABB)
> 3. Superset overlapping requests (AABBAA)
> 4. Subset overlapping requests (BBAABB)
> 5. Head overlapping requests (AABB)
> 6. Tail overlapping requests (BBAA)
> 7. Disjoint requests (AA BB)
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/qemu-iotests/100     | 134 +++++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/100.out |  89 ++++++++++++++++++++++++++++++
>  tests/qemu-iotests/group   |   1 +
>  3 files changed, 224 insertions(+)
>  create mode 100755 tests/qemu-iotests/100
>  create mode 100644 tests/qemu-iotests/100.out
> 

> +echo "== Superset overlapping requests =="
> +_make_test_img $size
> +$QEMU_IO -c "multiwrite 0 4k ; 1k 2k" "$TEST_IMG" | _filter_qemu_io
> +
> +echo
> +echo "== verify pattern =="
> +# Order of overlapping in-flight requests is not guaranteed so we cannot verify
> +# [1k, 3k) since it could have either pattern 0xcd or 0xce.
> +$QEMU_IO -c "read -P 0xcd 0 1k" "$TEST_IMG" | _filter_qemu_io
> +$QEMU_IO -c "read -P 0xcd 3k 1k" "$TEST_IMG" | _filter_qemu_io
> +$QEMU_IO -c "read -P 0 4k 4k" "$TEST_IMG" | _filter_qemu_io

I agree that we can't guarantee whether the first or the second write
requested ended up in [1k, 3k).  But can we enhance 'read' to allow one
or two new modes, so that we can do a test that no 0 bytes remain in the
region (all bytes were written), and/or do a test that all bytes in the
region have the same (unknown) value (we don't know whether A or B
finished first, but all bytes written came from the same job that
finished last)?  If we had such a verification mode, you could use it
here and in all the remaining tests where you skipped verification
because of not knowing which byte would be present.

But I would also be okay with enhancing 'read' as a followup patch, so:

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


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

  reply	other threads:[~2014-07-30 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  8:53 [Qemu-devel] [PATCH v2 0/2] block: fix multiwrite_merge() overlapping requests Stefan Hajnoczi
2014-07-30  8:53 ` [Qemu-devel] [PATCH v2 1/2] block: fix overlapping multiwrite requests Stefan Hajnoczi
2014-07-30 11:23   ` Eric Blake
2014-07-31  7:41   ` Benoît Canet
2014-07-30  8:53 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases Stefan Hajnoczi
2014-07-30 11:19   ` Eric Blake [this message]
2014-07-31  7:46   ` Benoît Canet
2014-08-29 13:10 ` [Qemu-devel] [PATCH v2 0/2] block: fix multiwrite_merge() overlapping requests Stefan Hajnoczi

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=53D8D4B4.8060208@redhat.com \
    --to=eblake@redhat.com \
    --cc=andrey@xdel.ru \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=sviatoslav.pestov@gmail.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).