block: vdi bounds check qemu-io tests
commit1e7226f70c9d944ae7f233b65fb4adda8f910dfe
authorJeff Cody <jcody@redhat.com>
Fri, 28 Mar 2014 15:42:25 +0000 (28 11:42 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Apr 2014 13:22:35 +0000 (1 15:22 +0200)
treee223e85040d72d984871c24016a57f946725a892
parentf0dce23475b5af5da6b17b97c1765271307734b6
block: vdi bounds check qemu-io tests

This test checks for proper bounds checking of some VDI input
headers.  The following is checked:

1. Max image size (1024TB) with the appropriate Blocks In Image
   value (0x3fffffff) is detected as valid.

2. Image size exceeding max (1024TB) is seen as invalid

3. Valid image size but with Blocks In Image value that is too
   small fails

4. Blocks In Image size exceeding max (0x3fffffff) is seen as invalid

5. 64MB image, with 64 Blocks In Image, and 1MB Block Size is seen
   as valid

6. Block Size < 1MB not supported

7. Block Size > 1MB not supported

[Max Reitz <mreitz@redhat.com> pointed out that "1MB + 1" in the test
case is wrong.  Change to "1MB + 64KB" to match the 0x110000 value.
--Stefan]

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/084 [new file with mode: 0755]
tests/qemu-iotests/084.out [new file with mode: 0644]
tests/qemu-iotests/group