qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/14] qemu-iotests: Rewrite 210 for blockdev-cr


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 10/14] qemu-iotests: Rewrite 210 for blockdev-create job
Date: Tue, 29 May 2018 15:02:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-05-25 18:33, Kevin Wolf wrote:
> This rewrites the test case 210 to work with the new x-blockdev-create
> job rather than the old synchronous version of the command.
> 
> All of the test cases stay the same as before, but in order to be able
> to implement proper job handling, the test case is rewritten in Python.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  tests/qemu-iotests/210        | 393 
> ++++++++++++++++++------------------------
>  tests/qemu-iotests/210.out    | 189 ++++++++++++++------
>  tests/qemu-iotests/group      |   2 +-
>  tests/qemu-iotests/iotests.py |  12 +-
>  4 files changed, 310 insertions(+), 286 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

> diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210
> index e607c0d296..ff4fddea56 100755
> --- a/tests/qemu-iotests/210
> +++ b/tests/qemu-iotests/210

[...]

> +    #
> +    # Invalid sizes
> +    #
> +
> +    # TODO Negative image sizes aren't handled correctly, but this is a 
> problem
> +    # with QAPI's implementation of the 'size' type and affects other 
> commands as
> +    # well. Once this is fixed, we may want to add a test case here.
> +
> +    # 1. 2^64 - 512
> +    # 2. 2^63 = 8 EB (qemu-img enforces image sizes less than this)
> +    # 3. 2^63 - 512 (generally valid, but with the crypto header the file 
> will
> +    #                exceed 63 bits)
> +    iotests.log("=== Invalid sizes ===")
> +    iotests.log("")
> +
> +    vm.launch()
> +    for size in [ 18446744073709551104, 9223372036854775808, 
> 9223372036854775296 ]:

Maybe this would be nice in patch 8 as well.

Max

> +        blockdev_create(vm, { 'driver': imgfmt,
> +                              'file': 'node0',
> +                              'key-secret': 'keysec0',
> +                              'size': size })
> +    vm.shutdown(

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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