qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/5] iotests: fix remainining te


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/5] iotests: fix remainining tests to work with LUKS
Date: Tue, 3 Jan 2017 13:06:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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 <address@hidden>
> ---

> +++ 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 <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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