iotests/197: Fix for non-qcow2 formats
While 197 is very much a qcow2 test, and it looks like the partial cluster case at the end (introduced inb0ddcbbb36
) is specifically a qcow2 case, the whole test scripts actually marks itself to work with generic formats (and generic protocols, even). Said partial cluster case happened to work with non-qcow2 formats as well (mostly by accident), but1855536256
broke that, because it sets the compat option, which does not work for non-qcow2 formats. So go the whole way and force IMGFMT=qcow2 and IMGPROTO=file, as done in other places in this test. Fixes:1855536256
("iotests/197: Fix for compat=0.10") Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200728131134.902519-1-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
ae159450e1
commit
afac471b71
@ -114,9 +114,11 @@ echo
|
||||
|
||||
# Force compat=1.1, because writing zeroes on a v2 image without a
|
||||
# backing file would just result in an unallocated cluster
|
||||
_make_test_img -o compat=1.1 1024
|
||||
$QEMU_IO -f $IMGFMT -C -c 'read 0 1024' "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IO -f $IMGFMT -c map "$TEST_IMG"
|
||||
# (Also, note that this is really a pure qcow2 test.)
|
||||
IMGPROTO=file IMGFMT=qcow2 TEST_IMG_FILE="$TEST_WRAP" \
|
||||
_make_test_img --no-opts -o compat=1.1 1024
|
||||
$QEMU_IO -f qcow2 -C -c 'read 0 1024' "$TEST_WRAP" | _filter_qemu_io
|
||||
$QEMU_IO -f qcow2 -c map "$TEST_WRAP"
|
||||
_check_test_img
|
||||
|
||||
# success, all done
|
||||
|
@ -26,7 +26,7 @@ Images are identical.
|
||||
|
||||
=== Partial final cluster ===
|
||||
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024
|
||||
Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=IMGFMT size=1024
|
||||
read 1024/1024 bytes at offset 0
|
||||
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
|
||||
|
Loading…
Reference in New Issue
Block a user