From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbv1i-0000Tu-PQ for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbv1d-0000Dr-9C for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:23:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbv1d-0000Dg-0B for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:23:13 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9VGNBJS002112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Oct 2013 12:23:12 -0400 Message-ID: <527283EE.8030909@redhat.com> Date: Thu, 31 Oct 2013 10:23:10 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ln4KmnkqvncV1nDtLqrLmDT0rlkNX2SUf" Subject: Re: [Qemu-devel] [PATCH 2/7] block: qemu-iotests, fix _make_test_img() to work with spaced pathnames 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) --ln4KmnkqvncV1nDtLqrLmDT0rlkNX2SUf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/31/2013 09:57 AM, Jeff Cody wrote: > _make_test_img() currently works with spaced pathnames only when not > specifying a backing file. This fixes it so that the backing file > argument is properly quoted. >=20 > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/common.rc | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake As a slight optimization, you could avoid a subshell: > # XXX(hch): have global image options? > - $QEMU_IMG create -f $IMGFMT $extra_img_options $img_name $image_si= ze 2>&1 | \ > + ( > + if [ $use_backing =3D 1 ]; then > + $QEMU_IMG create -f $IMGFMT $extra_img_options -b "$backing_fi= le" "$img_name" $image_size 2>&1 > + else > + $QEMU_IMG create -f $IMGFMT $extra_img_options "$img_name" $im= age_size 2>&1 > + fi > + ) | \ $QEMU_IMG create -f $IMGFMT $extra_img_options \ ${backing_file:+-b "$backing_file"} "$img_name" $image_size 2>&1 | But as not everyone is a shell guru to recognize the ${var+:expansion} trick, I'm fine with the version you proposed. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ln4KmnkqvncV1nDtLqrLmDT0rlkNX2SUf 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/ iQEcBAEBCAAGBQJScoPuAAoJEKeha0olJ0NqAxUH/j919HOAbtXrVSzmwJ6Q8ZG3 Ho2/05Fiaiz4g2MLnzv34MdJdvyJe8vFB2/5e0ZMA6SiQ8xXauPm8mWUF0s78mWU VbCvWN2HpRgKtgp6dl7ChnYSUH4pZzKf2rOpM1x6ke12gNYfL2V0PvG7p58S15ox jk9mR40Vfy+WA7xmdMUJvs+q6zvkOygT3D46kzDu8t8TsiYI/y4QbDrfZ/DIUp22 DnghO5T8An6pgtjxenpJzKIAyFEzX9w6qLJOlX5+g7aWDTeSf2M3x0QLryxCcJKf CoToTpwMGz2dKtWUNEak6NcqdgXdKrG21D3JfaNdQSVhkyO0su1QqfoDY3AUt8c= =379W -----END PGP SIGNATURE----- --ln4KmnkqvncV1nDtLqrLmDT0rlkNX2SUf--