From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai67k-00078l-9i for qemu-devel@nongnu.org; Mon, 21 Mar 2016 16:08:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai67j-0000nY-7V for qemu-devel@nongnu.org; Mon, 21 Mar 2016 16:08:24 -0400 References: <1458569512-22970-1-git-send-email-berrange@redhat.com> <1458569512-22970-9-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56F054B0.9050007@redhat.com> Date: Mon, 21 Mar 2016 14:08:16 -0600 MIME-Version: 1.0 In-Reply-To: <1458569512-22970-9-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aC84vW74vup5vn9gUJdL5XDcC8XUJaR1n" Subject: Re: [Qemu-devel] [PATCH v6 08/11] block: add support for --image-opts in block I/O tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aC84vW74vup5vn9gUJdL5XDcC8XUJaR1n Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/21/2016 08:11 AM, Daniel P. Berrange wrote: > Currently all block tests use the traditional syntax for images > just specifying a filename. To support the LUKS driver without > resorting to JSON, the tests need to be able to use the new > --image-opts argument to qemu-img and qemu-io. >=20 > This introduces a new env variable IMGOPTSSYNTAX. If this is Would IMG_OPTS_SYNTAX be any more legible? > set to 'true', then qemu-img/qemu-io should use --image-opts. >=20 > Signed-off-by: Daniel P. Berrange > --- > tests/qemu-iotests/common | 7 ++++- > tests/qemu-iotests/common.config | 15 +++++++++-- > tests/qemu-iotests/common.rc | 58 +++++++++++++++++++++++++++++---= -------- > 3 files changed, 62 insertions(+), 18 deletions(-) >=20 > diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common > index ff84f4b..05c9df2 100644 > --- a/tests/qemu-iotests/common > +++ b/tests/qemu-iotests/common > @@ -53,6 +53,7 @@ export QEMU_IO_OPTIONS=3D"" > export CACHEMODE_IS_DEFAULT=3Dtrue > export QEMU_OPTIONS=3D"-nodefaults" > export VALGRIND_QEMU=3D > +export IMGOPTSSYNTAX=3Dfalse Particularly since we use _ between words in other variables above. > @@ -199,7 +221,13 @@ _cleanup_test_img() > =20 > _check_test_img() > { > - $QEMU_IMG check "$@" -f $IMGFMT "$TEST_IMG" 2>&1 | _filter_testdir= | \ > + ( > + if [ "$IMGOPTSSYNTAX" =3D "true" ]; then > + $QEMU_IMG check --image-opts "$@" "$TEST_IMG" 2>&1 > + else > + $QEMU_IMG check "$@" -f $IMGFMT "$TEST_IMG" 2>&1 > + fi > + ) | _filter_testdir | \ Would '{ if ... fi; } |' be any better than a subshell? But the idea looks to be on track. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --aC84vW74vup5vn9gUJdL5XDcC8XUJaR1n 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/ iQEcBAEBCAAGBQJW8FSwAAoJEKeha0olJ0NqAzIH/2V0PJkF2g5W3MlupXXmPfKK DVab9UI1CF3bRkJk0eIsDXB7+IoQFs6sDNr7hWg6xLhTtOFf7QalYPVGgVgBzKPb ghrSJ3Mav36hdFHxIyRQ0FJb0aSMeG6Q0KVH8B4FGYNV4VvAZm5bbMnEk4roaCQy VMw2wf6YOcGkkAvJcymeJeq9Mx4W0ci9QRIG5JuLBTfSariXaCrA38vaFfl+figJ srY/ITxfjqBAbQyqf5hObaE3ypvhizHx46MDQx1cseJEaefnhukfnY6YOd6RCUqB 1bR7oRpQ95RUOkh5YBBWSYkYIpdS/pDwlj6rtj0SkPa1iQDy/TmVwsGeMpfTdNA= =n+Y6 -----END PGP SIGNATURE----- --aC84vW74vup5vn9gUJdL5XDcC8XUJaR1n--