From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzp7V-00071c-Dr for qemu-devel@nongnu.org; Thu, 27 Oct 2016 14:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzp7S-0006WK-5K for qemu-devel@nongnu.org; Thu, 27 Oct 2016 14:09:41 -0400 From: Kevin Wolf Date: Thu, 27 Oct 2016 20:09:04 +0200 Message-Id: <1477591747-21962-21-git-send-email-kwolf@redhat.com> In-Reply-To: <1477591747-21962-1-git-send-email-kwolf@redhat.com> References: <1477591747-21962-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 20/23] iotests.py: Allow concurrent qemu instances List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Max Reitz 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 Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 5a2678f..c589deb 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 -- 1.8.3.1