diff options
author | Jeff Cody <jcody@redhat.com> | 2014-07-23 17:23:01 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-15 15:07:15 +0200 |
commit | 23d20b5b4fb7bde102e6779b7a13b88375e4db66 (patch) | |
tree | 6415218f74bfa4c28eb88a77c0f641aca04d9ec4 /tests/qemu-iotests/084 | |
parent | fef6070eff233400015cede968b0afe46c80bb0f (diff) | |
download | qemu-23d20b5b4fb7bde102e6779b7a13b88375e4db66.zip qemu-23d20b5b4fb7bde102e6779b7a13b88375e4db66.tar.gz qemu-23d20b5b4fb7bde102e6779b7a13b88375e4db66.tar.bz2 |
block: iotest - update 084 to test static VDI image creation
This updates the VDI corruption test to also test static VDI image
creation, as well as the default dynamic image creation.
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/084')
-rwxr-xr-x | tests/qemu-iotests/084 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/qemu-iotests/084 b/tests/qemu-iotests/084 index cb4d7b7..ae33c2c 100755 --- a/tests/qemu-iotests/084 +++ b/tests/qemu-iotests/084 @@ -1,6 +1,7 @@ #!/bin/bash # -# Test case for VDI header corruption; image too large, and too many blocks +# Test case for VDI header corruption; image too large, and too many blocks. +# Also simple test for creating dynamic and static VDI images. # # Copyright (C) 2013 Red Hat, Inc. # @@ -43,14 +44,25 @@ _supported_fmt vdi _supported_proto generic _supported_os Linux +size=64M ds_offset=368 # disk image size field offset bs_offset=376 # block size field offset bii_offset=384 # block in image field offset echo +echo "=== Statically allocated image creation ===" +echo +_make_test_img $size -o static +_img_info +stat -c"disk image file size in bytes: %s" "${TEST_IMG}" +_cleanup_test_img + +echo echo "=== Testing image size bounds ===" echo -_make_test_img 64M +_make_test_img $size +_img_info +stat -c"disk image file size in bytes: %s" "${TEST_IMG}" # check for image size too large # poke max image size, and appropriate blocks_in_image value |