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 <be...@igalia.com>
> Reviewed-by: Eric Blake <ebl...@redhat.com>
> Reviewed-by: Max Reitz <mre...@redhat.com>
> ---
>  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

Reply via email to