[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 32/32] iotests: Add test for l2-cache-entry-size
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH v2 32/32] iotests: Add test for l2-cache-entry-size |
Date: |
Fri, 15 Dec 2017 13:54:00 +0100 |
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 <address@hidden>
---
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 ecbd8ebd71..6d9aab986b 100755
--- a/tests/qemu-iotests/103
+++ b/tests/qemu-iotests/103
@@ -64,6 +64,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
+$QEMU_IO -c "open -o l2-cache-entry-size=128k $TEST_IMG" \
+ 2>&1 | _filter_testdir | _filter_imgfmt
+
echo
echo '=== Testing valid option combinations ==='
echo
@@ -92,6 +100,15 @@ $QEMU_IO -c "open -o
l2-cache-size=1M,refcount-cache-size=0.25M $TEST_IMG" \
-c 'read -P 42 0 64k' \
| _filter_qemu_io
+# Valid cache entry sizes
+$QEMU_IO -c "open -o l2-cache-entry-size=512 $TEST_IMG" \
+ 2>&1 | _filter_testdir | _filter_imgfmt
+$QEMU_IO -c "open -o l2-cache-entry-size=16k $TEST_IMG" \
+ 2>&1 | _filter_testdir | _filter_imgfmt
+$QEMU_IO -c "open -o l2-cache-entry-size=64k $TEST_IMG" \
+ 2>&1 | _filter_testdir | _filter_imgfmt
+
+
echo
echo '=== Testing minimal L2 cache and COW ==='
echo
diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out
index b7aaadf89a..bd45d3875a 100644
--- a/tests/qemu-iotests/103.out
+++ b/tests/qemu-iotests/103.out
@@ -9,6 +9,9 @@ can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size
and refcount-cach
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
+can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of
two between 512 and the cluster size (65536)
+can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of
two between 512 and the cluster size (65536)
+can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of
two between 512 and the cluster size (65536)
=== Testing valid option combinations ===
--
2.11.0
- [Qemu-devel] [PATCH v2 29/32] qcow2: Rename l2_table in count_contiguous_clusters_unallocated(), (continued)
- [Qemu-devel] [PATCH v2 29/32] qcow2: Rename l2_table in count_contiguous_clusters_unallocated(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 28/32] qcow2: Rename l2_table in count_contiguous_clusters(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 05/32] qcow2: Remove BDS parameter from qcow2_cache_table_release(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 21/32] qcow2: Update handle_alloc() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 02/32] qcow2: Add table size field to Qcow2Cache, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 06/32] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 09/32] qcow2: Remove BDS parameter from qcow2_cache_clean_unused(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 27/32] qcow2: Rename l2_table in qcow2_alloc_compressed_cluster_offset(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 17/32] qcow2: Update get_cluster_table() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 04/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 32/32] iotests: Add test for l2-cache-entry-size,
Alberto Garcia <=
- [Qemu-devel] [PATCH v2 24/32] qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 31/32] qcow2: Allow configuring the L2 slice size, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 07/32] qcow2: Remove BDS parameter from qcow2_cache_put(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 25/32] qcow2: Update expand_zero_clusters_in_l1() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 10/32] qcow2: Remove BDS parameter from qcow2_cache_discard(), Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 18/32] qcow2: Update qcow2_get_cluster_offset() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 20/32] qcow2: Update handle_copied() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 16/32] qcow2: Update l2_allocate() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 19/32] qcow2: Update qcow2_alloc_cluster_link_l2() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-devel] [PATCH v2 12/32] qcow2: Add offset_to_l1_index(), Alberto Garcia, 2017/12/15