diff options
author | Max Reitz <mreitz@redhat.com> | 2016-10-25 15:11:38 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-10-27 19:05:23 +0200 |
commit | 5fcbdf508a9b5962d2e609b95364e1aae8797a4c (patch) | |
tree | 0fd53ebcc4e7c90886b4ba76a4c9364cfa88a37f /tests | |
parent | bec87774c24aac5b950f4a51ca0f5edee5d88966 (diff) |
iotests.py: Allow concurrent qemu instances
By adding an optional suffix to the files used for communication with a
VM, we can launch multiple VM instances concurrently.
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 5a2678fcc2..c589deb39e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -140,8 +140,10 @@ def log(msg, filters=[]): class VM(qtest.QEMUQtestMachine): '''A QEMU VM''' - def __init__(self): - super(VM, self).__init__(qemu_prog, qemu_opts, test_dir=test_dir, + def __init__(self, path_suffix=''): + name = "qemu%s-%d" % (path_suffix, os.getpid()) + super(VM, self).__init__(qemu_prog, qemu_opts, name=name, + test_dir=test_dir, socket_scm_helper=socket_scm_helper) if debug: self._debug = True |