]> git.proxmox.com Git - qemu.git/commitdiff
qemu-iotests: Preallocated zero clusters in 061
authorMax Reitz <mreitz@redhat.com>
Wed, 25 Sep 2013 10:07:23 +0000 (12:07 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 27 Sep 2013 09:16:36 +0000 (11:16 +0200)
Add a test case for zero cluster expansion on an image completely filled
with preallocated zero clusters to test 061.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/061
tests/qemu-iotests/061.out

index 5f04bfa851916607dbb1063f64684aba9dde53ce..fa9319da26dba818f0f29e961ae9281b9a4e4be0 100755 (executable)
@@ -200,6 +200,15 @@ $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 "=== Testing preallocated zero expansion on full image ==="
+echo
+IMGOPTS="compat=1.1" TEST_IMG="$TEST_IMG" _make_test_img 64M
+$QEMU_IO -c "write -P 0x2a 0 64M" "$TEST_IMG" -c "write -z 0 64M" | _filter_qemu_io
+$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
+_check_test_img
+$QEMU_IO -c "read -P 0 0 64M" "$TEST_IMG" | _filter_qemu_io
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
index d42127fb6fcec1118c683e7becfe51bf2d86d473..4027e0077ea60a057d283d98be854f1068efb471 100644 (file)
@@ -373,4 +373,15 @@ read 131072/131072 bytes at offset 0
 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 preallocated zero expansion on full image ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
+wrote 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+No errors were found on the image.
+read 67108864/67108864 bytes at offset 0
+64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 *** done