qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 2/3] block: add support for encryption secret


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v8 2/3] block: add support for encryption secrets in block I/O tests
Date: Fri, 6 May 2016 15:26:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

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.
> 
> When the IMGKEYSECRET env variable is set, it provides the
> password to be associated with a secret called 'keysec0'
> 
> 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.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  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(-)
> 

[...]

> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> 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" = "true" ]; then
> -            $QEMU_IMG check --image-opts "$@" "$TEST_IMG" 2>&1
> +            object_options=
> +            if [ -n "$IMGKEYSECRET" ]; then
> +                object_options="--object 
> secret,id=keysec0,data=$IMGKEYSECRET"
> +            fi
> +
> +            $QEMU_IMG check $object_options --image-opts "$@" "$TEST_IMG" 
> 2>&1

It might make sense to use $QEMU_IMG_EXTRA_ARGS here.

However you decide:

Reviewed-by: Max Reitz <address@hidden>

>          else
>              $QEMU_IMG check "$@" -f $IMGFMT "$TEST_IMG" 2>&1
>          fi
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]