From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCRuo-0003bC-4s for qemu-devel@nongnu.org; Wed, 30 Jul 2014 07:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCRuj-0003TN-6w for qemu-devel@nongnu.org; Wed, 30 Jul 2014 07:19:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCRui-0003TF-Vn for qemu-devel@nongnu.org; Wed, 30 Jul 2014 07:19:21 -0400 Message-ID: <53D8D4B4.8060208@redhat.com> Date: Wed, 30 Jul 2014 05:19:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406710411-26373-1-git-send-email-stefanha@redhat.com> <1406710411-26373-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1406710411-26373-3-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iEwGxoMCihDxo4qj9PbjhmpnwEneVB28t" Subject: Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , andrey@xdel.ru, Fam Zheng , sviatoslav.pestov@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iEwGxoMCihDxo4qj9PbjhmpnwEneVB28t Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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) >=20 > Signed-off-by: Stefan Hajnoczi > --- > 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 >=20 > +echo "=3D=3D Superset overlapping requests =3D=3D" > +_make_test_img $size > +$QEMU_IO -c "multiwrite 0 4k ; 1k 2k" "$TEST_IMG" | _filter_qemu_io > + > +echo > +echo "=3D=3D verify pattern =3D=3D" > +# Order of overlapping in-flight requests is not guaranteed so we cann= ot 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iEwGxoMCihDxo4qj9PbjhmpnwEneVB28t Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT2NS0AAoJEKeha0olJ0NqYLgIAJ7H0KWwd+Mh2g+hllUmRUh+ PebkYMnlX0GcMKxVbd2hNEEkUrOKHLPiGFlzBYJeA+Deudq396RbEvAgxcqoSYs3 kWifW3sXAysbsRXricdrfTO7gYE8zNsoSwqRtY1hFyQXJxtwgtabCXtotwQJ68jV TbOLOyDEqn+4HRnCY0BWnAWqet+2FBvZIKLDShbh3RJMydKjixtP5lFQH1UPxUbe +XqB75oAy+jZbgHsjNxkn3S65rcoJoZbWELk34Ho698YpJyMddYQCG/JUmHZfrIu 6gImLrrrBiu443EIX+rj6XsGAvTuGM1H/8RhCiRUx/xhNUi5+g1WgL9hBUHbVcs= =rwMB -----END PGP SIGNATURE----- --iEwGxoMCihDxo4qj9PbjhmpnwEneVB28t--