diff options
author | Jeff Cody <jcody@redhat.com> | 2013-10-30 10:44:55 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-11-07 13:58:59 +0100 |
commit | 751aec24cdcd4359b5927df5cebfe6b8d3e74515 (patch) | |
tree | 3f5c13a352fe73545b54478a7d8cfa756efac8ae /tests/qemu-iotests/064 | |
parent | 228b234dd73383408743d749d29a6c37e9d99981 (diff) |
block: qemu-iotests for vhdx, add write test support
This removes the IMGFMT_GENERIC blocker for read-only, so existing
iotests run read/write tests for vhdx images created by qemu-img (e.g.
tests 001, 002, 003).
In addition, this updates the sample image test for the Hyper-V
created image, to verify we can write it as well.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/064')
-rwxr-xr-x | tests/qemu-iotests/064 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qemu-iotests/064 b/tests/qemu-iotests/064 index 6789aa6ee4..1c74c31a1a 100755 --- a/tests/qemu-iotests/064 +++ b/tests/qemu-iotests/064 @@ -56,6 +56,17 @@ echo echo "=== Verify pattern 0x00, 66M - 1024M ===" $QEMU_IO -r -c "read -pP 0x00 66M 958M" "$TEST_IMG" | _filter_qemu_io +echo +echo "=== Verify pattern write, 0xc3 99M-157M ===" +$QEMU_IO -c "write -pP 0xc3 99M 58M" "$TEST_IMG" | _filter_qemu_io +# first verify we didn't write where we should not have +$QEMU_IO -c "read -pP 0xa5 0 33M" "$TEST_IMG" | _filter_qemu_io +$QEMU_IO -c "read -pP 0x96 33M 33M" "$TEST_IMG" | _filter_qemu_io +$QEMU_IO -c "read -pP 0x00 66M 33M" "$TEST_IMG" | _filter_qemu_io +$QEMU_IO -c "read -pP 0x00 157MM 867MM" "$TEST_IMG" | _filter_qemu_io +# now verify what we should have actually written +$QEMU_IO -c "read -pP 0xc3 99M 58M" "$TEST_IMG" | _filter_qemu_io + # success, all done echo "*** done" rm -f $seq.full |