@@ -52,9 +52,15 @@ echo
echo '=== Testing invalid option combinations ==='
echo
+# l2-cache-size and l2-cache-full at the same time
+$QEMU_IO -c "open -o l2-cache-full,l2-cache-size=1M $TEST_IMG" 2>&1 |
+ _filter_testdir | _filter_imgfmt
# all sizes set at the same time
$QEMU_IO -c "open -o cache-size=1.25M,l2-cache-size=1M,refcount-cache-size=0.25M $TEST_IMG" \
2>&1 | _filter_testdir | _filter_imgfmt
+# cache-size may not be smaller than the full L2 size if l2-cache-full is used
+$QEMU_IO -c "open -o l2-cache-full,cache-size=6K $TEST_IMG" 2>&1 |
+ _filter_testdir | _filter_imgfmt
# l2-cache-size may not exceed cache-size
$QEMU_IO -c "open -o cache-size=1M,l2-cache-size=2M $TEST_IMG" 2>&1 \
| _filter_testdir | _filter_imgfmt
@@ -5,7 +5,9 @@ wrote 65536/65536 bytes at offset 0
=== Testing invalid option combinations ===
-can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time
+can't open device TEST_DIR/t.IMGFMT: l2-cache-full and l2-cache-size may not be set at the same time
+can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
+can't open device TEST_DIR/t.IMGFMT: cache-size must be greater than the full L2 cache if l2-cache-full is used
can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size
can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size
can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time
@@ -106,7 +106,9 @@ echo
$QEMU_IO \
-c "reopen -o lazy-refcounts=42" \
+ -c "reopen -o l2-cache-full,l2-cache-size=64k" \
-c "reopen -o cache-size=1M,l2-cache-size=64k,refcount-cache-size=64k" \
+ -c "reopen -o l2-cache-full,cache-size=6K" \
-c "reopen -o cache-size=1M,l2-cache-size=2M" \
-c "reopen -o cache-size=1M,refcount-cache-size=2M" \
-c "reopen -o l2-cache-size=256T" \
@@ -16,7 +16,9 @@ read 33554432/33554432 bytes at offset 0
=== Try setting some invalid values ===
Parameter 'lazy-refcounts' expects 'on' or 'off'
-cache-size, l2-cache-size and refcount-cache-size may not be set the same time
+l2-cache-full and l2-cache-size may not be set at the same time
+cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
+cache-size must be greater than the full L2 cache if l2-cache-full is used
l2-cache-size may not exceed cache-size
refcount-cache-size may not exceed cache-size
L2 cache size too big
This patch adds tests for the l2-cache-full option, and also intcoduces a small change due to a grammar fix in block/qcow2.c Signed-off-by: Leonid Bloch <lbloch@janustech.com> --- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 4 +++- tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 4 +++- 4 files changed, 14 insertions(+), 2 deletions(-)