From 10f08a0a3435afea441db8d0981dbad49042c7cf Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 6 May 2014 21:08:46 +0800 Subject: qemu-iotests: Test converting to streamOptimized from small cluster size Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/059 | 7 +++++++ tests/qemu-iotests/059.out | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index ca5aa16ff7..26a2fd3e0e 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -103,6 +103,13 @@ IMGOPTS="subformat=monolithicSparse" _make_test_img 100G truncate -s 10M $TEST_IMG _img_info +echo +echo "=== Converting to streamOptimized from image with small cluster size===" +TEST_IMG="$TEST_IMG.qcow2" IMGFMT=qcow2 IMGOPTS="cluster_size=4096" _make_test_img 1G +$QEMU_IO -c "write -P 0xa 0 512" "$TEST_IMG.qcow2" | _filter_qemu_io +$QEMU_IO -c "write -P 0xb 10240 512" "$TEST_IMG.qcow2" | _filter_qemu_io +$QEMU_IMG convert -f qcow2 -O vmdk -o subformat=streamOptimized "$TEST_IMG.qcow2" "$TEST_IMG" 2>&1 + echo echo "=== Testing version 3 ===" _use_sample_img iotest-version3.vmdk.bz2 diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out index 14c0957126..eba0dedda0 100644 --- a/tests/qemu-iotests/059.out +++ b/tests/qemu-iotests/059.out @@ -2046,6 +2046,13 @@ RW 12582912 VMFS "dummy.IMGFMT" 1 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=107374182400 qemu-img: Could not open 'TEST_DIR/t.IMGFMT': File truncated, expecting at least 13172736 bytes +=== Converting to streamOptimized from image with small cluster size=== +Formatting 'TEST_DIR/t.vmdk.IMGFMT', fmt=IMGFMT size=1073741824 +wrote 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 512/512 bytes at offset 10240 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + === Testing version 3 === image: TEST_DIR/iotest-version3.IMGFMT file format: IMGFMT -- cgit v1.2.3