tests/qemu-iotests: Fix some tests that use --image-opts for other protocols

Tests 263, 284 and detect-zeroes-registered-buf use qemu-io
with --image-opts so we have to enforce IMGOPTSSYNTAX=true here
to get $TEST_IMG in shape for other protocols than "file".

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240315111108.153201-9-thuth@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Thomas Huth 2024-03-15 12:11:07 +01:00 committed by Kevin Wolf
parent 9677061ef1
commit cff614087d
3 changed files with 10 additions and 7 deletions

View file

@ -33,6 +33,8 @@ _cleanup()
}
trap "_cleanup; exit \$status" 0 1 2 3 15
IMGOPTSSYNTAX=true
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
@ -47,14 +49,12 @@ size=1M
SECRET="secret,id=sec0,data=astrochicken"
IMGSPEC="driver=$IMGFMT,file.filename=$TEST_IMG,encrypt.key-secret=sec0"
QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT
_run_test()
{
IMGOPTSSYNTAX=true
OLD_TEST_IMG="$TEST_IMG"
TEST_IMG="driver=$IMGFMT,file.filename=$TEST_IMG,encrypt.key-secret=sec0"
TEST_IMG="$TEST_IMG,encrypt.key-secret=sec0"
QEMU_IMG_EXTRA_ARGS="--image-opts --object $SECRET"
echo
@ -78,7 +78,6 @@ _run_test()
TEST_IMG="$OLD_TEST_IMG"
QEMU_IMG_EXTRA_ARGS=
IMGOPTSSYNTAX=
}