aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/121
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-11-07 17:36:57 +0100
committerMax Reitz <mreitz@redhat.com>2020-01-06 13:43:07 +0100
commit407fb56a8e10982d6e04b7a73e0c2cea3bed88b9 (patch)
tree1aaf59deed30a5b09cfec3c48e41446e5bf83e6c /tests/qemu-iotests/121
parent1c6d2f2128ba5e6848d078436f4252660b4d2af1 (diff)
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/121')
-rwxr-xr-xtests/qemu-iotests/1216
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qemu-iotests/121 b/tests/qemu-iotests/121
index 90a0424edb..10db813d94 100755
--- a/tests/qemu-iotests/121
+++ b/tests/qemu-iotests/121
@@ -50,7 +50,7 @@ echo
# Preallocation speeds up the write operation, but preallocating everything will
# destroy the purpose of the write; so preallocate one KB less than what would
# cause a reftable growth...
-IMGOPTS='preallocation=metadata,cluster_size=1k' _make_test_img 64512K
+_make_test_img -o 'preallocation=metadata,cluster_size=1k' 64512K
# ...and make the image the desired size afterwards.
$QEMU_IMG resize "$TEST_IMG" 65M
@@ -73,7 +73,7 @@ echo
echo '--- Test 2 ---'
echo
-IMGOPTS='preallocation=metadata,cluster_size=1k' _make_test_img 64513K
+_make_test_img -o 'preallocation=metadata,cluster_size=1k' 64513K
# This results in an L1 table growth which in turn results in some clusters at
# the start of the image becoming free
$QEMU_IMG resize "$TEST_IMG" 65M
@@ -96,7 +96,7 @@ echo
echo '=== Allocating a new refcount block must not leave holes in the image ==='
echo
-IMGOPTS='cluster_size=512,refcount_bits=16' _make_test_img 1M
+_make_test_img -o 'cluster_size=512,refcount_bits=16' 1M
# This results in an image with 256 used clusters: the qcow2 header,
# the refcount table, one refcount block, the L1 table, four L2 tables