Re: [Qemu-block] [PATCH v4 37/39] iotests: Test valid values of l2-cache-entry-size

2018-02-13 Thread Alberto Garcia
On Tue 13 Feb 2018 01:32:17 PM CET, Kevin Wolf wrote:
>> +# Invalid cache entry sizes
>> +$QEMU_IO -c "open -o l2-cache-entry-size=256 $TEST_IMG" \
>> +2>&1 | _filter_testdir | _filter_imgfmt
>> +$QEMU_IO -c "open -o l2-cache-entry-size=300 $TEST_IMG" \
>> +2>&1 | _filter_testdir | _filter_imgfmt
>
> If you wanted to test non-power-of-two values here, it would be better
> to use a value that isn't < 512 at the same time.

Good idea, if there's no new version of the series whoever applies this
can feel free to change this value to 3000 or something like that.

Berto



Re: [Qemu-block] [PATCH v4 37/39] iotests: Test valid values of l2-cache-entry-size

2018-02-13 Thread Kevin Wolf
Am 05.02.2018 um 15:33 hat Alberto Garcia geschrieben:
> The l2-cache-entry-size setting can only contain values that are
> powers of two between 512 and the cluster size.
> 
> Signed-off-by: Alberto Garcia 
> Reviewed-by: Eric Blake 
> Reviewed-by: Max Reitz 
> ---
>  tests/qemu-iotests/103 | 17 +
>  tests/qemu-iotests/103.out |  3 +++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103
> index d0cfab8844..7a2ca22803 100755
> --- a/tests/qemu-iotests/103
> +++ b/tests/qemu-iotests/103
> @@ -66,6 +66,14 @@ $QEMU_IO -c "open -o cache-size=1M,refcount-cache-size=2M 
> $TEST_IMG" 2>&1 \
>  $QEMU_IO -c "open -o cache-size=0,l2-cache-size=0,refcount-cache-size=0 
> $TEST_IMG" \
>  2>&1 | _filter_testdir | _filter_imgfmt
>  
> +# Invalid cache entry sizes
> +$QEMU_IO -c "open -o l2-cache-entry-size=256 $TEST_IMG" \
> +2>&1 | _filter_testdir | _filter_imgfmt
> +$QEMU_IO -c "open -o l2-cache-entry-size=300 $TEST_IMG" \
> +2>&1 | _filter_testdir | _filter_imgfmt

If you wanted to test non-power-of-two values here, it would be better
to use a value that isn't < 512 at the same time.

> +$QEMU_IO -c "open -o l2-cache-entry-size=128k $TEST_IMG" \
> +2>&1 | _filter_testdir | _filter_imgfmt

Kevin