mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
vmdk: Check for overhead when opening
Report an error if file size is even smaller than metadata. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
46bae92713
commit
34ceed81f9
3 changed files with 18 additions and 0 deletions
|
@ -97,6 +97,12 @@ RW 12582912 VMFS "dummy.vmdk" 1
|
|||
EOF
|
||||
_img_info
|
||||
|
||||
echo
|
||||
echo "=== Testing truncated sparse ==="
|
||||
IMGOPTS="subformat=monolithicSparse" _make_test_img 100G
|
||||
truncate -s 10M $TEST_IMG
|
||||
_img_info
|
||||
|
||||
echo
|
||||
echo "=== Testing version 3 ==="
|
||||
_use_sample_img iotest-version3.vmdk.bz2
|
||||
|
|
|
@ -2043,6 +2043,11 @@ qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Invalid extent lines:
|
|||
RW 12582912 VMFS "dummy.IMGFMT" 1
|
||||
|
||||
|
||||
=== Testing truncated sparse ===
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=107374182400
|
||||
qemu-img: File truncated, expecting at least 13172736 bytes
|
||||
qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Could not open 'TEST_DIR/t.IMGFMT': Wrong medium type
|
||||
|
||||
=== Testing version 3 ===
|
||||
image: TEST_DIR/iotest-version3.IMGFMT
|
||||
file format: IMGFMT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue