summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2020-10-21 16:58:48 +0200
committerMax Reitz2020-12-18 12:35:55 +0100
commit5b66a8fc2012bdbe767aece12874fdbf3e9df50e (patch)
tree7f5cc8f3c3e340a9d8f488c396f6763452d168c9 /tests/qemu-iotests
parentqemu-io: add preallocate mode parameter for truncate command (diff)
downloadqemu-5b66a8fc2012bdbe767aece12874fdbf3e9df50e.tar.gz
qemu-5b66a8fc2012bdbe767aece12874fdbf3e9df50e.tar.xz
qemu-5b66a8fc2012bdbe767aece12874fdbf3e9df50e.zip
iotests: qemu_io_silent: support --image-opts
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20201021145859.11201-11-vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r--tests/qemu-iotests/iotests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index bcd4fe5b6f..1b7f376348 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -205,7 +205,12 @@ def qemu_io_log(*args):
def qemu_io_silent(*args):
'''Run qemu-io and return the exit code, suppressing stdout'''
- args = qemu_io_args + list(args)
+ if '-f' in args or '--image-opts' in args:
+ default_args = qemu_io_args_no_fmt
+ else:
+ default_args = qemu_io_args
+
+ args = default_args + list(args)
exitcode = subprocess.call(args, stdout=open('/dev/null', 'w'))
if exitcode < 0:
sys.stderr.write('qemu-io received signal %i: %s\n' %