summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/244
diff options
context:
space:
mode:
authorMax Reitz2019-11-07 17:36:57 +0100
committerMax Reitz2020-01-06 13:43:07 +0100
commit407fb56a8e10982d6e04b7a73e0c2cea3bed88b9 (patch)
tree1aaf59deed30a5b09cfec3c48e41446e5bf83e6c /tests/qemu-iotests/244
parentiotests: Inject space into -ocompat=0.10 in 051 (diff)
downloadqemu-407fb56a8e10982d6e04b7a73e0c2cea3bed88b9.tar.gz
qemu-407fb56a8e10982d6e04b7a73e0c2cea3bed88b9.tar.xz
qemu-407fb56a8e10982d6e04b7a73e0c2cea3bed88b9.zip
iotests: Replace IMGOPTS= by -o
Tests should not overwrite all user-supplied image options, but only add to it (which will effectively overwrite conflicting values). Accomplish this by passing options to _make_test_img via -o instead of $IMGOPTS. For some tests, there is no functional change because they already only appended options to IMGOPTS. For these, this patch is just a simplification. For others, this is a change, so they now heed user-specified $IMGOPTS. Some of those tests do not work with all image options, though, so we need to disable them accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-12-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/244')
-rwxr-xr-xtests/qemu-iotests/24410
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/qemu-iotests/244 b/tests/qemu-iotests/244
index 13978f93d2..0375bc12d4 100755
--- a/tests/qemu-iotests/244
+++ b/tests/qemu-iotests/244
@@ -41,13 +41,15 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+# External data files do not work with compat=0.10
+_unsupported_imgopts 'compat=0.10'
echo
echo "=== Create and open image with external data file ==="
echo
echo "With data file name in the image:"
-IMGOPTS="data_file=$TEST_IMG.data" _make_test_img 64M
+_make_test_img -o "data_file=$TEST_IMG.data" 64M
_check_test_img
$QEMU_IO -c "open $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
@@ -104,7 +106,7 @@ echo
echo "=== Standalone image with external data file (efficient) ==="
echo
-IMGOPTS="data_file=$TEST_IMG.data" _make_test_img 64M
+_make_test_img -o "data_file=$TEST_IMG.data" 64M
echo -n "qcow2 file size before I/O: "
du -b $TEST_IMG | cut -f1
@@ -154,7 +156,7 @@ echo
echo "=== Standalone image with external data file (valid raw) ==="
echo
-IMGOPTS="data_file=$TEST_IMG.data,data_file_raw=on" _make_test_img 64M
+_make_test_img -o "data_file=$TEST_IMG.data,data_file_raw=on" 64M
echo -n "qcow2 file size before I/O: "
du -b $TEST_IMG | cut -f1
@@ -187,7 +189,7 @@ echo
echo "=== bdrv_co_block_status test for file and offset=0 ==="
echo
-IMGOPTS="data_file=$TEST_IMG.data" _make_test_img 64M
+_make_test_img -o "data_file=$TEST_IMG.data" 64M
$QEMU_IO -c 'write -P 0x11 0 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
$QEMU_IO -c 'read -P 0x11 0 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io