diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-05-10 17:11:27 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-05-12 15:33:24 +0200 |
commit | 076003f526cebbf5bbef826f752019da5d2c3e89 (patch) | |
tree | 9ae26099af9695c6c4deb782a9b62e3dea6e7833 /tests/qemu-iotests/common | |
parent | c2e001cc829031f9c2e2c364c77861e3f75ac871 (diff) | |
download | qemu-076003f526cebbf5bbef826f752019da5d2c3e89.zip qemu-076003f526cebbf5bbef826f752019da5d2c3e89.tar.gz qemu-076003f526cebbf5bbef826f752019da5d2c3e89.tar.bz2 |
block: add support for --image-opts in block I/O tests
Currently all block tests use the traditional syntax for images
just specifying a filename. To support the LUKS driver without
resorting to JSON, the tests need to be able to use the new
--image-opts argument to qemu-img and qemu-io.
This introduces a new env variable IMGOPTSSYNTAX. If this is
set to 'true', then qemu-img/qemu-io should use --image-opts.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1462896689-18450-2-git-send-email-berrange@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common')
-rw-r--r-- | tests/qemu-iotests/common | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index 49e1931..fe3b1a0 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -53,6 +53,7 @@ export QEMU_IO_OPTIONS="" export CACHEMODE_IS_DEFAULT=true export QEMU_OPTIONS="-nodefaults" export VALGRIND_QEMU= +export IMGOPTSSYNTAX=false for r do @@ -399,7 +400,11 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \ done # Set qemu-io cache mode with $CACHEMODE we have -QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS -f $IMGFMT --cache $CACHEMODE" +if [ "$IMGOPTSSYNTAX" = "true" ]; then + QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS --cache $CACHEMODE" +else + QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS -f $IMGFMT --cache $CACHEMODE" +fi # Set default options for qemu-img create -o if they were not specified _set_default_imgopts |