[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v4 05/11] iotests: handle -f argument correctly for
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH v4 05/11] iotests: handle -f argument correctly for qemu_io_silent |
Date: |
Mon, 15 Oct 2018 19:06:27 +0300 |
Correctly rewrite default argument. After the patch, the function can
be used for other (not only default test-chosen) image format.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
tests/qemu-iotests/iotests.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 4e67fbbe96..bc0b8851bd 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -136,7 +136,12 @@ def qemu_io(*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 qemu_io_args and '-f' in args:
+ ind = qemu_io_args.index('-f')
+ args = qemu_io_args[:ind] + qemu_io_args[ind+2:] + list(args)
+ else:
+ args = qemu_io_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' %
--
2.18.0
- [Qemu-block] [PATCH v4 00/11] backup-top filter driver for backup, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 09/11] block: add lock/unlock range functions, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 10/11] block/backup: tiny refactor backup_job_create, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 05/11] iotests: handle -f argument correctly for qemu_io_silent,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH v4 01/11] block/backup: simplify backup_incremental_init_copy_bitmap, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 04/11] block: improve should_update_child, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 03/11] block: allow serialized reads to intersect, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 02/11] block/backup: move to copy_bitmap with granularity, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 11/11] block/backup: use backup-top instead of write notifiers, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 06/11] iotests: allow resume_drive by node name, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 08/11] block: introduce backup-top filter driver, Vladimir Sementsov-Ogievskiy, 2018/10/15
- [Qemu-block] [PATCH v4 07/11] iotests: prepare 055 to graph changes during backup job, Vladimir Sementsov-Ogievskiy, 2018/10/15