From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/5] iotests: fix remainining tests to work with LUKS
Date: Tue, 3 Jan 2017 13:06:05 -0600 [thread overview]
Message-ID: <830c4bc8-74ca-32fb-2fa7-2a295124c9d5@redhat.com> (raw)
In-Reply-To: <20170103170459.27662-3-berrange@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
On 01/03/2017 11:04 AM, Daniel P. Berrange wrote:
> The tests 033, 120, 140, 145 and 157 were all broken
> when run with LUKS, since they did not correctly use
> the required image opts args syntax to specify the
> decryption secret.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> +++ b/tests/qemu-iotests/120
> @@ -44,17 +44,36 @@ _supported_os Linux
>
> _make_test_img 64M
>
> +if test "$IMGOPTSSYNTAX" = "true"
> +then
> + SYSEMU_DRIVE_ARG=id=drv,if=none,$TEST_IMG
> + SYSEMU_EXTRA_ARGS=""
> + IO_DRIVE_ARG="$TEST_IMG"
> + IO_EXTRA_ARGS="--image-opts"
> + if [ -n "$IMGKEYSECRET" ]; then
> + SECRET_ARG="secret,id=keysec0,data=$IMGKEYSECRET"
> + SYSEMU_EXTRA_ARGS="$SYSEMU_EXTRA_ARGS -object $SECRET_ARG"
Should we favor the '--object' spelling rather than '-object'? But both
work (thanks to getopt_long_only()), so I'm not going to demand a respin.
> + IO_EXTRA_ARGS="$IO_EXTRA_ARGS --object $SECRET_ARG"
> + fi
> +else
> + SYSEMU_DRIVE_ARG=id=drv,if=none,file="$TEST_IMG",driver=raw,file.driver=$IMGFMT
> + SYSEMU_EXTRA_ARGS=""
> + IO_DRIVE_ARG="json:{'driver': 'raw', 'file': {'driver': '$IMGFMT', 'file': {'filename': '$TEST_IMG'}}}"
> + IO_EXTRA_ARGS=""
> +fi
> +
> +
> echo "{'execute': 'qmp_capabilities'}
> {'execute': 'human-monitor-command',
> 'arguments': {'command-line': 'qemu-io drv \"write -P 42 0 64k\"'}}
> {'execute': 'quit'}" \
> - | $QEMU -qmp stdio -nographic -nodefaults \
> - -drive id=drv,if=none,file="$TEST_IMG",driver=raw,file.driver=$IMGFMT \
> + | $QEMU -qmp stdio -nographic -nodefaults $SYSEMU_EXTRA_ARGS \
> + -drive $SYSEMU_DRIVE_ARG \
> | _filter_qmp | _filter_qemu_io
> $QEMU_IO -c 'read -P 42 0 64k' "$TEST_IMG" | _filter_qemu_io
>
> $QEMU_IO_PROG -c 'read -P 42 0 64k' \
> - "json:{'driver': 'raw', 'file': {'driver': '$IMGFMT', 'file': {'filename': '$TEST_IMG'}}}" \
> + $IO_EXTRA_ARGS "$IO_DRIVE_ARG" \
> | _filter_qemu_io
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-01-03 19:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 17:04 [Qemu-devel] [PATCH v2 0/5] Improve I/O tests coverage of LUKS Daniel P. Berrange
2017-01-03 17:04 ` [Qemu-devel] [PATCH v2 1/5] iotests: skip 159 & 170 with luks format Daniel P. Berrange
2017-01-03 17:10 ` Eric Blake
2017-01-03 17:04 ` [Qemu-devel] [PATCH v2 2/5] iotests: fix remainining tests to work with LUKS Daniel P. Berrange
2017-01-03 19:06 ` Eric Blake [this message]
2017-01-03 17:04 ` [Qemu-devel] [PATCH v2 3/5] iotests: reduce PBKDF iterations when testing LUKS Daniel P. Berrange
2017-01-03 19:07 ` Eric Blake
2017-01-03 19:08 ` Eric Blake
2017-01-03 17:04 ` [Qemu-devel] [PATCH v2 4/5] iotests: add more LUKS hash combination tests Daniel P. Berrange
2017-01-03 19:08 ` Eric Blake
2017-01-03 17:04 ` [Qemu-devel] [PATCH v2 5/5] iotests: chown LUKS device before qemu-io launches Daniel P. Berrange
2017-01-03 19:20 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=830c4bc8-74ca-32fb-2fa7-2a295124c9d5@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).