]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests: qemu_io_silent: support --image-opts
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 21 Oct 2020 14:58:48 +0000 (17:58 +0300)
committerMax Reitz <mreitz@redhat.com>
Fri, 18 Dec 2020 11:35:55 +0000 (12:35 +0100)
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>
tests/qemu-iotests/iotests.py

index bcd4fe5b6fcb44e28c8080094ec5adaf9472baf9..1b7f37634855b83a895f516c8ec78a37e96942c7 100644 (file)
@@ -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' %