From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yl0U0-0000tA-J0 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 15:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yl0Tz-0008Ov-Hg for qemu-devel@nongnu.org; Wed, 22 Apr 2015 15:38:52 -0400 Message-ID: <5537F8C0.40601@redhat.com> Date: Wed, 22 Apr 2015 13:38:40 -0600 From: Eric Blake MIME-Version: 1.0 References: <5665024c0f933ff30b527f3da02c842c79156fd6.1429196435.git.berto@igalia.com> In-Reply-To: <5665024c0f933ff30b527f3da02c842c79156fd6.1429196435.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ETJdWrblLTp9HkiAweiw5i0273ab0BKoq" Subject: Re: [Qemu-devel] [PATCH 7/8] qemu-iotests: fix test_stream_partial() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ETJdWrblLTp9HkiAweiw5i0273ab0BKoq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/16/2015 09:12 AM, Alberto Garcia wrote: > This test is streaming to the top layer using the intermediate image > as the base. This is a mistake since block-stream never copies data > from the base image and its backing chain, so this is effectively a > no-op. >=20 > In addition to fixing the base parameter, this patch also writes some > data to the intermediate image before the test, so there's anything to s/anything/something/ > copy and the test is meaningful. >=20 > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/030 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) You know, we should _also_ test a no-op stream, to prove that we handle it correctly (we've had bugs in the past where 0-length active commit behaved differently in the events it generated than non-zero length), and your change is dropping that. > @@ -93,7 +94,7 @@ class TestSingleDrive(iotests.QMPTestCase): > def test_stream_partial(self): > self.assert_no_active_block_jobs() > =20 > - result =3D self.vm.qmp('block-stream', device=3D'drive0', base= =3Dmid_img) > + result =3D self.vm.qmp('block-stream', device=3D'drive0', base= =3Dbacking_img) So, I'd actually prefer to keep _both_ of these block-streams (of course, checking the result between both cases), or even add a second self.vm.qmp('block-stream', device=3D'drive0', base=3Dbacking_img) after = the first one (the first one streams data from mid into active and rebases active; the second one is a no-op), for maximal coverage of our behavior.= --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ETJdWrblLTp9HkiAweiw5i0273ab0BKoq 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVN/jAAAoJEKeha0olJ0NqOv8H+wb2XdK4rhtjHwT+0WepzE4I +bro1hxXyq0BrVm092tn9zqWKAxFNly+HjLIbJDzJLMT+awq3fltsTMhLT8aA3m1 NiZA9he7zH7CwjF1YE5rQ6upkMrBMe1tcX1+ASp1zqnTJ4CFxkV+CrFYWDqvhZ1a RL/OGaP30oD/u9OKVVujnRTke6qHylc344bK8ydVmzyn4En0luGZddpyygH6hNMm I33Z5OvaDw5bqaRS9r0i3AdKLIbcgK0swuD7gGm4e7ei9ATSIlgMxTRnWhggH6XA IYXehdbA8eZk96etI/fGFwVIRYz947nuu8r7vh+l4XsrXwmE/oOrEbZqMyEnY7Y= =llec -----END PGP SIGNATURE----- --ETJdWrblLTp9HkiAweiw5i0273ab0BKoq--