From e615053b1bd3e108a73958a54e3d0c5b965e15d3 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 4 Sep 2015 18:26:09 +0200 Subject: qemu-iotests: Reopen qcow2 with lazy-refcounts change Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/039 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests/qemu-iotests/039') diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 617f3977cc..9e9b379baa 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" -- cgit v1.2.3