From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtdGb-0007Ti-Sw for qemu-devel@nongnu.org; Tue, 03 Nov 2015 10:12:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtdGa-0001ga-Mh for qemu-devel@nongnu.org; Tue, 03 Nov 2015 10:12:57 -0500 References: <01f3e9b07d183eab94b771344bb6582a849d1ea1.1446546057.git.berto@igalia.com> From: Eric Blake Message-ID: <5638CEEC.9060705@redhat.com> Date: Tue, 3 Nov 2015 08:12:44 -0700 MIME-Version: 1.0 In-Reply-To: <01f3e9b07d183eab94b771344bb6582a849d1ea1.1446546057.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JJ9D1QKiq2EkGqrkfgJMHsDi1snb2jvpv" Subject: Re: [Qemu-devel] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085 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, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JJ9D1QKiq2EkGqrkfgJMHsDi1snb2jvpv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/03/2015 03:32 AM, Alberto Garcia wrote: > This patch removes the inner quotation marks in all cases like this: >=20 > cmd=3D" ... "${variable}" ... " >=20 > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/085 | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake I might have worded the commit message differently, though: block: Remove incorrect "" in iotest 085 We had the patterns: cmd=3D"..."${variable}"..." _send_qemu_cmd ... "..."${variable}"..." which is equivalent to using ${variable} unquoted. In the cmd=3D usage, that happened to be okay even though it is unusual (because no word splitting occurs on variable assignment); but where the usage appeared as an argument to _send_qemu_cmd, it was actively wrong (any whitespace in ${variable} would have caused word splitting). Fix it by removing the inner "", leaving ${variable} to be expanded inside the outer "" as desired. > @@ -152,7 +152,7 @@ echo =3D=3D=3D Invalid command - missing device and= nodename =3D=3D=3D > echo > =20 > _send_qemu_cmd $h "{ 'execute': 'blockdev-snapshot-sync', > - 'arguments': { 'snapshot-file':'"${TEST_DIR}/= 1-${snapshot_virt0}"', > + 'arguments': { 'snapshot-file':'${TEST_DIR}/1= -${snapshot_virt0}', > 'format': 'qcow2' } }" "error" > =20 Here's an example of the actual bug being fixed. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JJ9D1QKiq2EkGqrkfgJMHsDi1snb2jvpv 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/ iQEcBAEBCAAGBQJWOM7sAAoJEKeha0olJ0NquKsH/36VsUA1Ouuv1+F9JL3yvv10 xUCB68X67bzokbIkehW++QdUSx4LP9odW0kotBl4vyrw8L/rzDmsJDPrpObnjkCY wMB9sWEM3RyXPPwsRpF7Ed39UXyQwhh1HK3Bpz+GAvHCkvVXcvsixDIuavt6Pk/2 V3R+ez1UkUxsvPPjIlU3TR/sSb1u4oSIn2YsB3kBdYXk3zXjrsVqFu/RwQw2prwu mHl/DOT6AsRSynY5WkbSt4JUXWw0ObDg0BjwIesMlLbU1ZmAfzlyAwhMBOgxHjHb tuzEkYY23mApi57wVOlEB/YNeT+mTgKXdOt8iZA+S0LhIMJhd/DFWna04xzN6+k= =AZEn -----END PGP SIGNATURE----- --JJ9D1QKiq2EkGqrkfgJMHsDi1snb2jvpv--