From 32558ce7a43dc7e8e3d065ac26eb2cdbfa34b36b Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Thu, 17 Oct 2019 15:31:34 +0200 Subject: iotests.py: Store socket files in $SOCK_DIR iotests.py itself does not store socket files, but machine.py and qtest.py do. iotests.py needs to pass the respective path to them, and they need to adhere to it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-3-mreitz@redhat.com Signed-off-by: Max Reitz --- python/qemu/qtest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'python/qemu/qtest.py') diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py index 3f1d2cb..d24ad04 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/qtest.py @@ -84,14 +84,17 @@ class QEMUQtestMachine(QEMUMachine): '''A QEMU VM''' def __init__(self, binary, args=None, name=None, test_dir="/var/tmp", - socket_scm_helper=None): + socket_scm_helper=None, sock_dir=None): if name is None: name = "qemu-%d" % os.getpid() + if sock_dir is None: + sock_dir = test_dir super(QEMUQtestMachine, self).__init__(binary, args, name=name, test_dir=test_dir, - socket_scm_helper=socket_scm_helper) + socket_scm_helper=socket_scm_helper, + sock_dir=sock_dir) self._qtest = None - self._qtest_path = os.path.join(test_dir, name + "-qtest.sock") + self._qtest_path = os.path.join(sock_dir, name + "-qtest.sock") def _base_args(self): args = super(QEMUQtestMachine, self)._base_args() -- cgit v1.1