diff options
author | Max Reitz <mreitz@redhat.com> | 2014-08-07 22:47:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-15 15:07:16 +0200 |
commit | a42f8a3d05c5598cee893c9cf5ffeee48bacb83e (patch) | |
tree | 132fdf316eef6d05856855653be16164cc334457 /tests/qemu-iotests/060 | |
parent | ff52aab2df5c5e10f231481961b88d25a3021724 (diff) |
iotests: Add test for image header overlap
Add a test for an image with an unallocated image header; instead of an
assertion, this should result in the image being marked corrupt.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/060')
-rwxr-xr-x | tests/qemu-iotests/060 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index 3cffc12fec..830386fdaa 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -164,6 +164,15 @@ wait_break 0 write 64k 64k resume 0" | $QEMU_IO | _filter_qemu_io +echo +echo "=== Testing unallocated image header ===" +echo +_make_test_img 64M +# Create L1/L2 +$QEMU_IO -c "$OPEN_RW" -c "write 0 64k" | _filter_qemu_io +poke_file "$TEST_IMG" "$rb_offset" "\x00\x00" +$QEMU_IO -c "$OPEN_RW" -c "write 64k 64k" | _filter_qemu_io + # success, all done echo "*** done" rm -f $seq.full |