aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-11-07 17:36:59 +0100
committerMax Reitz <mreitz@redhat.com>2020-01-06 13:43:07 +0100
commitecb4c1d116634c49aee91680e87d6d89044d2632 (patch)
tree17fd6e538de9cde8bcf761539e89e9cee252804f /tests
parent10b612565ca96c7d660b3a77fa7cfb9dc3a0c9d0 (diff)
downloadqemu-ecb4c1d116634c49aee91680e87d6d89044d2632.zip
qemu-ecb4c1d116634c49aee91680e87d6d89044d2632.tar.gz
qemu-ecb4c1d116634c49aee91680e87d6d89044d2632.tar.bz2
iotests: Drop IMGOPTS use in 267
Overwriting IMGOPTS means ignoring all user-supplied options, which is not what we want. Replace the current IMGOPTS use by a new BACKING_FILE variable. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-14-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/26712
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/qemu-iotests/267 b/tests/qemu-iotests/267
index b823668..bd9a5c5 100755
--- a/tests/qemu-iotests/267
+++ b/tests/qemu-iotests/267
@@ -69,7 +69,11 @@ size=128M
run_test()
{
- _make_test_img $size
+ if [ -n "$BACKING_FILE" ]; then
+ _make_test_img -b "$BACKING_FILE" $size
+ else
+ _make_test_img $size
+ fi
printf "savevm snap0\ninfo snapshots\nloadvm snap0\n" | run_qemu "$@" | _filter_date
}
@@ -120,12 +124,12 @@ echo
TEST_IMG="$TEST_IMG.base" _make_test_img $size
-IMGOPTS="backing_file=$TEST_IMG.base" \
+BACKING_FILE="$TEST_IMG.base" \
run_test -blockdev driver=file,filename="$TEST_IMG.base",node-name=backing-file \
-blockdev driver=file,filename="$TEST_IMG",node-name=file \
-blockdev driver=$IMGFMT,file=file,backing=backing-file,node-name=fmt
-IMGOPTS="backing_file=$TEST_IMG.base" \
+BACKING_FILE="$TEST_IMG.base" \
run_test -blockdev driver=file,filename="$TEST_IMG.base",node-name=backing-file \
-blockdev driver=$IMGFMT,file=backing-file,node-name=backing-fmt \
-blockdev driver=file,filename="$TEST_IMG",node-name=file \
@@ -142,7 +146,7 @@ echo
echo "=== -blockdev with NBD server on the backing file ==="
echo
-IMGOPTS="backing_file=$TEST_IMG.base" _make_test_img $size
+_make_test_img -b "$TEST_IMG.base" $size
cat <<EOF |
nbd_server_start unix:$SOCK_DIR/nbd
nbd_server_add -w backing-fmt