From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXwZ3-000117-NK for qemu-devel@nongnu.org; Fri, 04 Sep 2015 15:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXwZ2-0006ga-SU for qemu-devel@nongnu.org; Fri, 04 Sep 2015 15:22:21 -0400 References: <1441387117-27072-1-git-send-email-kwolf@redhat.com> <1441387117-27072-13-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: <55E9EF63.7080204@redhat.com> Date: Fri, 4 Sep 2015 21:22:11 +0200 MIME-Version: 1.0 In-Reply-To: <1441387117-27072-13-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IdEr9FwdoopPQP1MeSb6XweoDU2aU69nk" Subject: Re: [Qemu-devel] [PATCH v2 12/13] qemu-iotests: Reopen qcow2 with lazy-refcounts change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IdEr9FwdoopPQP1MeSb6XweoDU2aU69nk Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 04.09.2015 19:18, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/039 | 27 +++++++++++++++++++++++++++ > tests/qemu-iotests/039.out | 18 ++++++++++++++++++ > 2 files changed, 45 insertions(+) >=20 > diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 > index 617f397..9e9b379 100755 > --- a/tests/qemu-iotests/039 > +++ b/tests/qemu-iotests/039 > @@ -147,6 +147,33 @@ $PYTHON qcow2.py "$TEST_IMG".base dump-header | gr= ep incompatible_features > _check_test_img > TEST_IMG=3D"$TEST_IMG".base _check_test_img > =20 > +echo > +echo "=3D=3D Changing lazy_refcounts setting at runtime =3D=3D" > + > +IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Doff" > +_make_test_img $size > + > +$QEMU_IO -c "reopen -o lazy-refcounts=3Don" \ > + -c "write -P 0x5a 0 512" \ > + -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ > + | _filter_qemu_io > + > +# The dirty bit must be set > +$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features > +_check_test_img > + > +IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" > +_make_test_img $size > + > +$QEMU_IO -c "reopen -o lazy-refcounts=3Doff" \ > + -c "write -P 0x5a 0 512" \ Maybe it would be nicer to test this the other way around, write first and then disable lazy refcounts in order to test whether the refcounts are actually flushed during the reopen. Either way: Reviewed-by: Max Reitz > + -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ > + | _filter_qemu_io > + > +# The dirty bit must not be set > +$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features > +_check_test_img > + > =20 > # success, all done > echo "*** done" > diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out > index b055670..39859b2 100644 > --- a/tests/qemu-iotests/039.out > +++ b/tests/qemu-iotests/039.out > @@ -74,4 +74,22 @@ incompatible_features 0x0 > incompatible_features 0x0 > No errors were found on the image. > No errors were found on the image. > + > +=3D=3D Changing lazy_refcounts setting at runtime =3D=3D > +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 > +wrote 512/512 bytes at offset 0 > +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +./common.config: Killed ( exec "$QEMU_IO_PROG" $QEMU_= IO_OPTIONS "$@" ) > +incompatible_features 0x1 > +ERROR cluster 5 refcount=3D0 reference=3D1 > +ERROR OFLAG_COPIED data cluster: l2_entry=3D8000000000050000 refcount=3D= 0 > + > +2 errors were found on the image. > +Data may be corrupted, or further writes to the image may corrupt it. > +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 > +wrote 512/512 bytes at offset 0 > +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +./common.config: Killed ( exec "$QEMU_IO_PROG" $QEMU_= IO_OPTIONS "$@" ) > +incompatible_features 0x0 > +No errors were found on the image. > *** done >=20 --IdEr9FwdoopPQP1MeSb6XweoDU2aU69nk 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 iQEcBAEBCAAGBQJV6e9jAAoJEDuxQgLoOKytHWcH/javAzPbNyK+Zz9Jc4+WXKcr UBJ/KDqvtjBc82uoQcS9ieWjZ/Nr/5bFu8Tts4JSnxFvw1IAIxbSkpXj+5Fo8AXZ hcIQEB2aaDShdXGLTtb6i4zFkJIY+xm6nHIB5vDZu9pKp2ZSeRiXzxJxKQVainYh 4Gec//gwwjHtecXcnq0eUd1tXuiS50kkb49ThrGhr8cmZnJLLK0swpuSHszguJmq n2IoB6FlVpzBrlN8atTaNwcLlhri7WaHnickZO64x5uxwRhepYsIblvxtmAfVcR7 ve+Y99w43rcnXxDhwGAdi8J/8EKXTliVJNhpVdRC2/aJXMCWluoOjx4qj6Z8xcc= =rUp6 -----END PGP SIGNATURE----- --IdEr9FwdoopPQP1MeSb6XweoDU2aU69nk--