From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOELi-00010i-1K for qemu-devel@nongnu.org; Wed, 18 Feb 2015 18:48:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOELe-0005ER-HY for qemu-devel@nongnu.org; Wed, 18 Feb 2015 18:48:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOELe-0005EL-BJ for qemu-devel@nongnu.org; Wed, 18 Feb 2015 18:48:06 -0500 Message-ID: <54E524B2.9000906@redhat.com> Date: Wed, 18 Feb 2015 18:48:02 -0500 From: John Snow MIME-Version: 1.0 References: <1424268014-13293-1-git-send-email-vsementsov@parallels.com> <1424268014-13293-10-git-send-email-vsementsov@parallels.com> In-Reply-To: <1424268014-13293-10-git-send-email-vsementsov@parallels.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v3 09/14] iotests: maintain several vms in test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, quintela@redhat.com, dgilbert@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, amit.shah@redhat.com, den@openvz.org On 02/18/2015 09:00 AM, Vladimir Sementsov-Ogievskiy wrote: > The only problem with it is the same qmp socket name (which is > vm._monitor_path) for all vms. And because of this second vm couldn't be > lauched (vm.launch() fails because of socket is already in use). > This patch adds a number of vm into vm._monitor_path > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > 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 cf5faac..fa756b4 100644 > --- a/tests/qemu-iotests/iotests.py > +++ b/tests/qemu-iotests/iotests.py > @@ -77,16 +77,18 @@ def create_image(name, size): > > class VM(object): > '''A QEMU VM''' > + nb_vms = 0 > > def __init__(self): > - self._monitor_path = os.path.join(test_dir, 'qemu-mon.%d' % os.getpid()) > - self._qemu_log_path = os.path.join(test_dir, 'qemu-log.%d' % os.getpid()) > + self._monitor_path = os.path.join(test_dir, 'qemu-mon.%d.%d' % (os.getpid(), VM.nb_vms)) > + self._qemu_log_path = os.path.join(test_dir, 'qemu-log.%d.%d' % (os.getpid(), VM.nb_vms)) > self._args = qemu_args + ['-chardev', > 'socket,id=mon,path=' + self._monitor_path, > '-mon', 'chardev=mon,mode=control', > '-qtest', 'stdio', '-machine', 'accel=qtest', > '-display', 'none', '-vga', 'none'] > self._num_drives = 0 > + VM.nb_vms += 1 > > # This can be used to add an unused monitor instance. > def add_monitor_telnet(self, ip, port): > Simple enough, thanks! Reviewed-by: John Snow