mirror of https://github.com/xqemu/xqemu.git
qemu-iotests: New test case in 061
Add one test case for zero cluster expansion on qcow2 version downgrade in shared L2 tables (i.e., L2 tables with a refcount > 1) and one for zero expansion on backed clusters in shared L2 tables. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
fd9c577b24
commit
d982919d38
|
@ -145,6 +145,19 @@ $QEMU_IMG snapshot -a foo "$TEST_IMG"
|
||||||
_check_test_img
|
_check_test_img
|
||||||
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "=== Testing zero expansion on shared L2 table ==="
|
||||||
|
echo
|
||||||
|
IMGOPTS="compat=1.1" _make_test_img 64M
|
||||||
|
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
$QEMU_IMG snapshot -c foo "$TEST_IMG"
|
||||||
|
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||||
|
_check_test_img
|
||||||
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
$QEMU_IMG snapshot -a foo "$TEST_IMG"
|
||||||
|
_check_test_img
|
||||||
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "=== Testing zero expansion on backed image ==="
|
echo "=== Testing zero expansion on backed image ==="
|
||||||
echo
|
echo
|
||||||
|
@ -172,6 +185,21 @@ $QEMU_IMG snapshot -a foo "$TEST_IMG"
|
||||||
_check_test_img
|
_check_test_img
|
||||||
$QEMU_IO -c "read -P 0 0 64k" -c "read -P 0x2a 64k 64k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0 0 64k" -c "read -P 0x2a 64k 64k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "=== Testing zero expansion on backed image with shared L2 table ==="
|
||||||
|
echo
|
||||||
|
IMGOPTS="compat=1.1" TEST_IMG="$TEST_IMG.base" _make_test_img 64M
|
||||||
|
$QEMU_IO -c "write -P 0x2a 0 128k" "$TEST_IMG.base" | _filter_qemu_io
|
||||||
|
IMGOPTS="compat=1.1,backing_file=$TEST_IMG.base" _make_test_img 64M
|
||||||
|
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
$QEMU_IMG snapshot -c foo "$TEST_IMG"
|
||||||
|
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||||
|
_check_test_img
|
||||||
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
$QEMU_IMG snapshot -a foo "$TEST_IMG"
|
||||||
|
_check_test_img
|
||||||
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
# success, all done
|
# success, all done
|
||||||
echo "*** done"
|
echo "*** done"
|
||||||
rm -f $seq.full
|
rm -f $seq.full
|
||||||
|
|
|
@ -312,6 +312,18 @@ No errors were found on the image.
|
||||||
read 131072/131072 bytes at offset 0
|
read 131072/131072 bytes at offset 0
|
||||||
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
|
||||||
|
=== Testing zero expansion on shared L2 table ===
|
||||||
|
|
||||||
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
||||||
|
wrote 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
No errors were found on the image.
|
||||||
|
read 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
No errors were found on the image.
|
||||||
|
read 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
|
||||||
=== Testing zero expansion on backed image ===
|
=== Testing zero expansion on backed image ===
|
||||||
|
|
||||||
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
|
||||||
|
@ -346,4 +358,19 @@ read 65536/65536 bytes at offset 0
|
||||||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
read 65536/65536 bytes at offset 65536
|
read 65536/65536 bytes at offset 65536
|
||||||
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
|
||||||
|
=== Testing zero expansion on backed image with shared L2 table ===
|
||||||
|
|
||||||
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
|
||||||
|
wrote 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file='TEST_DIR/t.IMGFMT.base'
|
||||||
|
wrote 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
No errors were found on the image.
|
||||||
|
read 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
No errors were found on the image.
|
||||||
|
read 131072/131072 bytes at offset 0
|
||||||
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
*** done
|
*** done
|
||||||
|
|
Loading…
Reference in New Issue