• J
    block: vdi bounds check qemu-io tests · 1e7226f7
    Jeff Cody 提交于
    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: NJeff Cody <jcody@redhat.com>
    Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    1e7226f7
group 1.5 KB