[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/23] qemu-iotests: Reopen qcow2 with lazy-refcounts
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 18/23] qemu-iotests: Reopen qcow2 with lazy-refcounts change |
Date: |
Fri, 11 Sep 2015 21:40:58 +0200 |
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/039 | 27 +++++++++++++++++++++++++++
tests/qemu-iotests/039.out | 18 ++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
index 617f397..9e9b379 100755
--- a/tests/qemu-iotests/039
+++ b/tests/qemu-iotests/039
@@ -147,6 +147,33 @@ $PYTHON qcow2.py "$TEST_IMG".base dump-header | grep
incompatible_features
_check_test_img
TEST_IMG="$TEST_IMG".base _check_test_img
+echo
+echo "== Changing lazy_refcounts setting at runtime =="
+
+IMGOPTS="compat=1.1,lazy_refcounts=off"
+_make_test_img $size
+
+$QEMU_IO -c "reopen -o lazy-refcounts=on" \
+ -c "write -P 0x5a 0 512" \
+ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
+ | _filter_qemu_io
+
+# The dirty bit must be set
+$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
+_check_test_img
+
+IMGOPTS="compat=1.1,lazy_refcounts=on"
+_make_test_img $size
+
+$QEMU_IO -c "reopen -o lazy-refcounts=off" \
+ -c "write -P 0x5a 0 512" \
+ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
+ | _filter_qemu_io
+
+# The dirty bit must not be set
+$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
+_check_test_img
+
# success, all done
echo "*** done"
diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out
index d8c5a44..03a31c5 100644
--- a/tests/qemu-iotests/039.out
+++ b/tests/qemu-iotests/039.out
@@ -74,4 +74,22 @@ incompatible_features 0x0
incompatible_features 0x0
No errors were found on the image.
No errors were found on the image.
+
+== Changing lazy_refcounts setting at runtime ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+./common.config: Killed ( exec "$QEMU_IO_PROG"
$QEMU_IO_OPTIONS "$@" )
+incompatible_features 0x1
+ERROR cluster 5 refcount=0 reference=1
+ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
+
+2 errors were found on the image.
+Data may be corrupted, or further writes to the image may corrupt it.
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+./common.config: Killed ( exec "$QEMU_IO_PROG"
$QEMU_IO_OPTIONS "$@" )
+incompatible_features 0x0
+No errors were found on the image.
*** done
--
1.8.3.1
- [Qemu-devel] [PULL 12/23] qcow2: Move qcow2_update_options() call up, (continued)
- [Qemu-devel] [PULL 12/23] qcow2: Move qcow2_update_options() call up, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 11/23] qcow2: Factor out qcow2_update_options(), Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 06/23] qcow2: Rename BDRVQcowState to BDRVQcow2State, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 15/23] qcow2: Fix memory leak in qcow2_update_options() error path, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 13/23] qcow2: Move rest of option handling to qcow2_update_options(), Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 14/23] qcow2: Leave s unchanged on qcow2_update_options() failure, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 22/23] vmdk: Fix next_cluster_sector for compressed write, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 23/23] qcow2: Make qcow2_alloc_bytes() more explicit, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 21/23] iotests: Add test for checking large image files, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 16/23] qcow2: Make qcow2_update_options() suitable for transactions, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 18/23] qemu-iotests: Reopen qcow2 with lazy-refcounts change,
Kevin Wolf <=
- [Qemu-devel] [PULL 17/23] qcow2: Support updating driver-specific options in reopen, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 20/23] qcow2: Make size_to_clusters() return uint64_t, Kevin Wolf, 2015/09/11
- [Qemu-devel] [PULL 19/23] qemu-iotests: More qcow2 reopen tests, Kevin Wolf, 2015/09/11
- Re: [Qemu-devel] [PULL 00/23] Block layer patches, Peter Maydell, 2015/09/14