|
|
9ae3a8 |
From daca4d834e727c73565aa0659da6fab52ab7cc6b Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 25 May 2015 04:45:57 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 5/6] qemu-iotests: Test unaligned sub-block zero write
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1432529157-20381-4-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 65121
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.2 qemu-kvm PATCH v2 3/3] qemu-iotests: Test unaligned sub-block zero write
|
|
|
9ae3a8 |
Bugzilla: 1200295
|
|
|
9ae3a8 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Test zero write in byte range 512~1024 for 4k alignment.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
Message-id: 1431522721-3266-4-git-send-email-famz@redhat.com
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit ab53c44718305d3fde3d9d2251889f1cab694be2)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
tests/qemu-iotests/033 | 13 +++++++++++++
|
|
|
9ae3a8 |
tests/qemu-iotests/033.out | 30 ++++++++++++++++++++++++++++++
|
|
|
9ae3a8 |
2 files changed, 43 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
|
|
|
9ae3a8 |
index 4008f10..a61d8ce 100755
|
|
|
9ae3a8 |
--- a/tests/qemu-iotests/033
|
|
|
9ae3a8 |
+++ b/tests/qemu-iotests/033
|
|
|
9ae3a8 |
@@ -78,6 +78,19 @@ for align in 512 4k; do
|
|
|
9ae3a8 |
echo
|
|
|
9ae3a8 |
echo "== verifying patterns (2) =="
|
|
|
9ae3a8 |
do_test $align "read -P 0x0 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ echo
|
|
|
9ae3a8 |
+ echo "== rewriting unaligned zeroes =="
|
|
|
9ae3a8 |
+ do_test $align "write -P 0xb 0x0 0x1000" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+ do_test $align "write -z 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ echo
|
|
|
9ae3a8 |
+ echo "== verifying patterns (3) =="
|
|
|
9ae3a8 |
+ do_test $align "read -P 0xb 0x0 0x200" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+ do_test $align "read -P 0x0 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+ do_test $align "read -P 0xb 0x400 0xc00" "$TEST_IMG" | _filter_qemu_io
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ echo
|
|
|
9ae3a8 |
done
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
# success, all done
|
|
|
9ae3a8 |
diff --git a/tests/qemu-iotests/033.out b/tests/qemu-iotests/033.out
|
|
|
9ae3a8 |
index 344065f..6896d73 100644
|
|
|
9ae3a8 |
--- a/tests/qemu-iotests/033.out
|
|
|
9ae3a8 |
+++ b/tests/qemu-iotests/033.out
|
|
|
9ae3a8 |
@@ -27,6 +27,21 @@ wrote 65536/65536 bytes at offset 65536
|
|
|
9ae3a8 |
read 131072/131072 bytes at offset 1024
|
|
|
9ae3a8 |
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+== rewriting unaligned zeroes ==
|
|
|
9ae3a8 |
+wrote 4096/4096 bytes at offset 0
|
|
|
9ae3a8 |
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+wrote 512/512 bytes at offset 512
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+== verifying patterns (3) ==
|
|
|
9ae3a8 |
+read 512/512 bytes at offset 0
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+read 512/512 bytes at offset 512
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+read 3072/3072 bytes at offset 1024
|
|
|
9ae3a8 |
+3 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
== preparing image ==
|
|
|
9ae3a8 |
wrote 1024/1024 bytes at offset 512
|
|
|
9ae3a8 |
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
@@ -52,4 +67,19 @@ wrote 65536/65536 bytes at offset 65536
|
|
|
9ae3a8 |
== verifying patterns (2) ==
|
|
|
9ae3a8 |
read 131072/131072 bytes at offset 1024
|
|
|
9ae3a8 |
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+== rewriting unaligned zeroes ==
|
|
|
9ae3a8 |
+wrote 4096/4096 bytes at offset 0
|
|
|
9ae3a8 |
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+wrote 512/512 bytes at offset 512
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+== verifying patterns (3) ==
|
|
|
9ae3a8 |
+read 512/512 bytes at offset 0
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+read 512/512 bytes at offset 512
|
|
|
9ae3a8 |
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+read 3072/3072 bytes at offset 1024
|
|
|
9ae3a8 |
+3 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
*** done
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|