[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/23] iotests.py: Add qemu_nbd function
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 19/23] iotests.py: Add qemu_nbd function |
Date: |
Thu, 27 Oct 2016 20:09:03 +0200 |
From: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/iotests.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 3329bc1..5a2678f 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -39,6 +39,10 @@ qemu_io_args = [os.environ.get('QEMU_IO_PROG', 'qemu-io')]
if os.environ.get('QEMU_IO_OPTIONS'):
qemu_io_args += os.environ['QEMU_IO_OPTIONS'].strip().split(' ')
+qemu_nbd_args = [os.environ.get('QEMU_NBD_PROG', 'qemu-nbd')]
+if os.environ.get('QEMU_NBD_OPTIONS'):
+ qemu_nbd_args += os.environ['QEMU_NBD_OPTIONS'].strip().split(' ')
+
qemu_prog = os.environ.get('QEMU_PROG', 'qemu')
qemu_opts = os.environ.get('QEMU_OPTIONS', '').strip().split(' ')
@@ -87,6 +91,10 @@ def qemu_io(*args):
sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, '
'.join(args)))
return subp.communicate()[0]
+def qemu_nbd(*args):
+ '''Run qemu-nbd in daemon mode and return the parent's exit code'''
+ return subprocess.call(qemu_nbd_args + ['--fork'] + list(args))
+
def compare_images(img1, img2, fmt1=imgfmt, fmt2=imgfmt):
'''Return True if two image files are identical'''
return qemu_img('compare', '-f', fmt1,
--
1.8.3.1
- [Qemu-devel] [PULL 11/23] block/nbd: Drop trailing "." in error messages, (continued)
- [Qemu-devel] [PULL 11/23] block/nbd: Drop trailing "." in error messages, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 12/23] block/nbd: Reject port parameter without host, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 13/23] block/nbd: Default port in nbd_refresh_filename(), Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 10/23] qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 15/23] block/nbd: Add nbd_has_filename_options_conflict(), Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 14/23] block/nbd: Use qdict_put(), Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 18/23] qapi: Allow blockdev-add for NBD, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 16/23] block/nbd: Accept SocketAddress, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 17/23] block/nbd: Use SocketAddress options, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 21/23] socket_scm_helper: Accept fd directly, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 19/23] iotests.py: Add qemu_nbd function,
Kevin Wolf <=
- [Qemu-devel] [PULL 20/23] iotests.py: Allow concurrent qemu instances, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 22/23] iotests: Add assert_json_filename_equal() method, Kevin Wolf, 2016/10/27
- [Qemu-devel] [PULL 23/23] iotests: Add test for NBD's blockdev-add interface, Kevin Wolf, 2016/10/27
- Re: [Qemu-devel] [PULL 00/23] Block layer patches, Peter Maydell, 2016/10/28