Blame SOURCES/kvm-qemu-iotests-Test-converting-to-streamOptimized-from.patch

958e1b
From 44c99fa6aeff34f654a1475b4273308411b58520 Mon Sep 17 00:00:00 2001
958e1b
Message-Id: <44c99fa6aeff34f654a1475b4273308411b58520.1418766606.git.jen@redhat.com>
958e1b
In-Reply-To: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
958e1b
References: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
958e1b
From: Fam Zheng <famz@redhat.com>
958e1b
Date: Thu, 4 Dec 2014 00:05:15 -0600
958e1b
Subject: [CHANGE 21/31] qemu-iotests: Test converting to streamOptimized from
958e1b
 small cluster size
958e1b
To: rhvirt-patches@redhat.com,
958e1b
    jen@redhat.com
958e1b
958e1b
RH-Author: Fam Zheng <famz@redhat.com>
958e1b
Message-id: <1417651524-18041-22-git-send-email-famz@redhat.com>
958e1b
Patchwork-id: 62694
958e1b
O-Subject: [RHEL-7.1 qemu-kvm PATCH v5 21/30] qemu-iotests: Test converting to streamOptimized from small cluster size
958e1b
Bugzilla: 1134283
958e1b
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
958e1b
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
958e1b
RH-Acked-by: Max Reitz <mreitz@redhat.com>
958e1b
958e1b
Signed-off-by: Fam Zheng <famz@redhat.com>
958e1b
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
(cherry picked from commit 10f08a0a3435afea441db8d0981dbad49042c7cf)
958e1b
Signed-off-by: Fam Zheng <famz@redhat.com>
958e1b
Signed-off-by: Jeff E. Nelson <jen@redhat.com>
958e1b
---
958e1b
 tests/qemu-iotests/059     | 7 +++++++
958e1b
 tests/qemu-iotests/059.out | 7 +++++++
958e1b
 2 files changed, 14 insertions(+)
958e1b
958e1b
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
958e1b
index 71b7b49..1e7dbf6 100755
958e1b
--- a/tests/qemu-iotests/059
958e1b
+++ b/tests/qemu-iotests/059
958e1b
@@ -104,6 +104,13 @@ truncate -s 10M $TEST_IMG
958e1b
 _img_info
958e1b
 
958e1b
 echo
958e1b
+echo "=== Converting to streamOptimized from image with small cluster size==="
958e1b
+TEST_IMG="$TEST_IMG.qcow2" IMGFMT=qcow2 IMGOPTS="cluster_size=4096" _make_test_img 1G
958e1b
+$QEMU_IO -c "write -P 0xa 0 512" "$TEST_IMG.qcow2" | _filter_qemu_io
958e1b
+$QEMU_IO -c "write -P 0xb 10240 512" "$TEST_IMG.qcow2" | _filter_qemu_io
958e1b
+$QEMU_IMG convert -f qcow2 -O vmdk -o subformat=streamOptimized "$TEST_IMG.qcow2" "$TEST_IMG" 2>&1
958e1b
+
958e1b
+echo
958e1b
 echo "=== Testing version 3 ==="
958e1b
 _use_sample_img iotest-version3.vmdk.bz2
958e1b
 _img_info
958e1b
diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out
958e1b
index f226f71..9893edf 100644
958e1b
--- a/tests/qemu-iotests/059.out
958e1b
+++ b/tests/qemu-iotests/059.out
958e1b
@@ -2046,6 +2046,13 @@ RW 12582912 VMFS "dummy.IMGFMT" 1
958e1b
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=107374182400
958e1b
 qemu-img: Could not open 'TEST_DIR/t.IMGFMT': File truncated, expecting at least 13172736 bytes
958e1b
 
958e1b
+=== Converting to streamOptimized from image with small cluster size===
958e1b
+Formatting 'TEST_DIR/t.vmdk.IMGFMT', fmt=IMGFMT size=1073741824
958e1b
+wrote 512/512 bytes at offset 0
958e1b
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
958e1b
+wrote 512/512 bytes at offset 10240
958e1b
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
958e1b
+
958e1b
 === Testing version 3 ===
958e1b
 image: TEST_DIR/iotest-version3.IMGFMT
958e1b
 file format: IMGFMT
958e1b
-- 
958e1b
2.1.0
958e1b