[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 04/25] iotests: qcow2 COW with minimal L2 cache size
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 04/25] iotests: qcow2 COW with minimal L2 cache size |
Date: |
Fri, 12 Jun 2015 18:23:13 +0200 |
From: Max Reitz <address@hidden>
This adds a test case to test 103 for performing a COW operation in a
qcow2 image using an L2 cache with minimal size (which should be at
least two clusters so the COW can access both source and destination
simultaneously).
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/103 | 10 ++++++++++
tests/qemu-iotests/103.out | 5 +++++
2 files changed, 15 insertions(+)
diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103
index ccab551..fa9a3c1 100755
--- a/tests/qemu-iotests/103
+++ b/tests/qemu-iotests/103
@@ -93,6 +93,16 @@ $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
+echo
+echo '=== Testing minimal L2 cache and COW ==='
+echo
+
+$QEMU_IMG snapshot -c foo "$TEST_IMG"
+# This requires a COW operation, which accesses two L2 tables simultaneously
+# (COW source and destination), so there must be enough space in the cache to
+# place both tables there (and qemu should not crash)
+$QEMU_IO -c "open -o cache-size=0 $TEST_IMG" -c 'write 0 64k' | _filter_qemu_io
+
# success, all done
echo '*** done'
rm -f $seq.full
diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out
index ee705b0..d05f49f 100644
--- a/tests/qemu-iotests/103.out
+++ b/tests/qemu-iotests/103.out
@@ -26,4 +26,9 @@ read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+=== Testing minimal L2 cache and COW ===
+
+wrote 65536/65536 bytes at offset 0
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done
--
1.8.3.1
- [Qemu-block] [PULL 00/25] Block layer core and image format patches, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 01/25] iotests: remove assertIsNotNone call, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 02/25] qemu-iotests: Fix 128 if sudo required, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 03/25] qcow2: Set MIN_L2_CACHE_SIZE to 2, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 04/25] iotests: qcow2 COW with minimal L2 cache size,
Kevin Wolf <=
- [Qemu-block] [PULL 05/25] qcow2: Add DEFAULT_L2_CACHE_CLUSTERS, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 06/25] vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 08/25] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 09/25] block: record new size in bdrv_dirty_bitmap_truncate, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 07/25] vmdk: Use vmdk_find_index_in_cluster everywhere, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 10/25] block: Change bitmap truncate conditional to assertion, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 11/25] block: driver should override flags in bdrv_open(), Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 12/25] iotests: Add tests for overriding BDRV_O_PROTOCOL, Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 13/25] qdict: Add qdict_array_entries(), Kevin Wolf, 2015/06/12
- [Qemu-block] [PULL 14/25] qdict: Add qdict_{set,copy}_default(), Kevin Wolf, 2015/06/12