diff options
author | Fam Zheng <famz@redhat.com> | 2015-05-13 13:12:01 +0000 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-05-22 09:37:33 +0100 |
commit | ab53c44718305d3fde3d9d2251889f1cab694be2 (patch) | |
tree | aacb993a5e5900b6cc65cff27afe4027ed004145 /tests/qemu-iotests/033 | |
parent | 9eeb6dd1b27bd57eb4e3869290e87feac8e8b226 (diff) | |
download | qemu-ab53c44718305d3fde3d9d2251889f1cab694be2.zip qemu-ab53c44718305d3fde3d9d2251889f1cab694be2.tar.gz qemu-ab53c44718305d3fde3d9d2251889f1cab694be2.tar.bz2 |
qemu-iotests: Test unaligned sub-block zero write
Test zero write in byte range 512~1024 for 4k alignment.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1431522721-3266-4-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/033')
-rwxr-xr-x | tests/qemu-iotests/033 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033 index 4008f10..a61d8ce 100755 --- a/tests/qemu-iotests/033 +++ b/tests/qemu-iotests/033 @@ -78,6 +78,19 @@ for align in 512 4k; do echo echo "== verifying patterns (2) ==" do_test $align "read -P 0x0 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io + + echo + echo "== rewriting unaligned zeroes ==" + do_test $align "write -P 0xb 0x0 0x1000" "$TEST_IMG" | _filter_qemu_io + do_test $align "write -z 0x200 0x200" "$TEST_IMG" | _filter_qemu_io + + echo + echo "== verifying patterns (3) ==" + do_test $align "read -P 0xb 0x0 0x200" "$TEST_IMG" | _filter_qemu_io + do_test $align "read -P 0x0 0x200 0x200" "$TEST_IMG" | _filter_qemu_io + do_test $align "read -P 0xb 0x400 0xc00" "$TEST_IMG" | _filter_qemu_io + + echo done # success, all done |