From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbwW1-0006iB-TA for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:58:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbwVw-0005L4-Uu for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:58:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbwVw-0005Kt-M9 for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:58:36 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9VHwTbN000526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Oct 2013 13:58:34 -0400 Message-ID: <52728CC1.8000104@redhat.com> Date: Thu, 31 Oct 2013 11:00:49 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xPuU5oIAfi8mUXEx2U1amajuWXDch3pFE" Subject: Re: [Qemu-devel] [PATCH 4/7] block: qemu-iotests, add quotes to $TEST_IMG usage in 019 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xPuU5oIAfi8mUXEx2U1amajuWXDch3pFE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/31/2013 09:57 AM, Jeff Cody wrote: > There were still instances of $TEST_IMG not being properly quoted. > This was in the usage of a string built up for a 'for' loop; modify > the loop so we can quote $TEST_IMG properly. >=20 > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/019 | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019 > index cd3582c..5bb18d0 100755 > --- a/tests/qemu-iotests/019 > +++ b/tests/qemu-iotests/019 > @@ -90,12 +90,12 @@ mv "$TEST_IMG" "$TEST_IMG.orig" > # Test the conversion twice: One test with the old-style -B option and= another > # one with -o backing_file > =20 > -for backing_option in "-B $TEST_IMG.base" "-o backing_file=3D$TEST_IMG= =2Ebase"; do > +for backing_option in "-B " "-o backing_file=3D"; do > =20 > echo > - echo Testing conversion with $backing_option | _filter_testdir | _= filter_imgfmt > + echo Testing conversion with $backing_option$TEST_IMG.base | _filt= er_testdir | _filter_imgfmt If $TEST_IMG has 2 consecutive spaces [*], this echo produces spurious output (flattening to only 1 space). To be completely robust, you must quote here in the same manner... > echo > - $QEMU_IMG convert -O $IMGFMT $backing_option "$TEST_IMG.orig" "$TE= ST_IMG" > + $QEMU_IMG convert -O $IMGFMT $backing_option"$TEST_IMG.base" "$TES= T_IMG.orig" "$TEST_IMG" =2E..as what you execute. But as that corner case of misquoting doesn't fail the test, your patch is a strict improvement, so I'm okay whether you post a v2, or whether you keep this as-is and add: Reviewed-by: Eric Blake [*] My favorite test for quoting bugs is renaming a directory to use 'two spaces', because some quoting bugs are missed when you only test 'one space'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xPuU5oIAfi8mUXEx2U1amajuWXDch3pFE 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJScozBAAoJEKeha0olJ0NqBToH/AnFkyKg6b7SGYjnxrhFIVph EgQ1+qHjgWAoDSF1KOFgDoSU7IfXZbJfajqn1UculrXWXVyRE1fysZlEVV9rfBAQ diHorFAvdmUSF6qOcM+pPNSCZUylpWyOLyKnH5j5JrZTzzFzQ8Cg+qRY50z0Xpkt GzkPWgJPIj8c9c175iuRFOADs85lIf8It2FjGpijVKaOlUnGG/dJdi9zyo8HwYpH 1tvGE/N123Ptg94J9bWTJVCa1+xE9+lz4NI30HKnyoBQ9BFQDE2bUxXpOl85cvNa bYwpeRL1LJxtFJN11I1jH16cSHzqHkfUVJ5lc+N2lhFmnHHhUgguOZXs92I4txc= =jBnp -----END PGP SIGNATURE----- --xPuU5oIAfi8mUXEx2U1amajuWXDch3pFE--