Received: from eggs.gnu.org ([2001:4830:134:3::10]:56529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayfmO-0005BD-Tp for qemu-devel@nongnu.org; Fri, 06 May 2016 09:26:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayfmD-00048j-64 for qemu-devel@nongnu.org; Fri, 06 May 2016 09:26:47 -0400 References: <1460982107-4649-1-git-send-email-berrange@redhat.com> <1460982107-4649-3-git-send-email-berrange@redhat.com> From: Max Reitz Message-ID: Date: Fri, 6 May 2016 15:26:00 +0200 MIME-Version: 1.0 In-Reply-To: <1460982107-4649-3-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Sx5iKL6Bov4nknDlx0l8QFMcaGOl6J32" Subject: Re: [Qemu-devel] [PATCH v8 2/3] block: add support for encryption secrets 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: qemu-block@nongnu.org, Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9Sx5iKL6Bov4nknDlx0l8QFMcaGOl6J32 Content-Type: multipart/mixed; boundary="XXmA4F9LF6LROmmT1gpUxclspOtbkw99j" From: Max Reitz To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf Message-ID: Subject: Re: [PATCH v8 2/3] block: add support for encryption secrets in block I/O tests References: <1460982107-4649-1-git-send-email-berrange@redhat.com> <1460982107-4649-3-git-send-email-berrange@redhat.com> In-Reply-To: <1460982107-4649-3-git-send-email-berrange@redhat.com> --XXmA4F9LF6LROmmT1gpUxclspOtbkw99j Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 18.04.2016 14:21, Daniel P. Berrange wrote: > The LUKS block driver tests will require the ability to specify > encryption secrets with block devices. This requires using the > --object argument to qemu-img/qemu-io to create a 'secret' > object. >=20 > When the IMGKEYSECRET env variable is set, it provides the > password to be associated with a secret called 'keysec0' >=20 > The _qemu_img_wrapper function isn't modified as that needs > to cope with differing syntax for subcommands, so can't be > made to use the image opts syntax unconditionally. >=20 > Signed-off-by: Daniel P. Berrange > --- > tests/qemu-iotests/common | 1 + > tests/qemu-iotests/common.config | 6 ++++++ > tests/qemu-iotests/common.filter | 3 ++- > tests/qemu-iotests/common.rc | 16 +++++++++++++--- > 4 files changed, 22 insertions(+), 4 deletions(-) >=20 [...] > diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.r= c > index b702653..c72bdb3 100644 > --- a/tests/qemu-iotests/common.rc > +++ b/tests/qemu-iotests/common.rc [...] > @@ -222,7 +227,12 @@ _check_test_img() > { > ( > if [ "$IMGOPTSSYNTAX" =3D "true" ]; then > - $QEMU_IMG check --image-opts "$@" "$TEST_IMG" 2>&1 > + object_options=3D > + if [ -n "$IMGKEYSECRET" ]; then > + object_options=3D"--object secret,id=3Dkeysec0,data=3D= $IMGKEYSECRET" > + fi > + > + $QEMU_IMG check $object_options --image-opts "$@" "$TEST_I= MG" 2>&1 It might make sense to use $QEMU_IMG_EXTRA_ARGS here. However you decide: Reviewed-by: Max Reitz > else > $QEMU_IMG check "$@" -f $IMGFMT "$TEST_IMG" 2>&1 > fi >=20 --XXmA4F9LF6LROmmT1gpUxclspOtbkw99j-- --9Sx5iKL6Bov4nknDlx0l8QFMcaGOl6J32 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 iQEcBAEBCAAGBQJXLJtpAAoJEDuxQgLoOKyt/wkH/0XmmnTgdf6TjBkBXDmGrwUG HISxUrF6tSt8FAmkLJ2m9B0rf8JbB4hkiJskbhO/fM6DyBAwfnkXRQEz1f3hfvc2 q69QVwRTD9fErtQvWetXjxpeS1UqnIxt03ZTKkL9js73kfjvJwG5+Dm+pgacWhwc 9cuuB6jh8i44YLmHoIMmBg7c7Rg51MMhom0f+lrVd8hUd+0jigLHh8Ce1FBpEuPL Fl+3qxQ1e30TVpMVoMkR07MHIhDjp3ATwih3lRIKbb3m9Elc42qymIiuv4jhRU0h 0Oxxb4gHa5k8g74So/JDdAONfuvBaGc03pSFQZJIyorU5WFrthwLONRNVnc8bQg= =x8fM -----END PGP SIGNATURE----- --9Sx5iKL6Bov4nknDlx0l8QFMcaGOl6J32--