From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 4FE621B05 for ; Fri, 25 May 2018 10:37:57 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9707D80D; Fri, 25 May 2018 01:37:56 -0700 (PDT) Received: from phil-VirtualBox.shanghai.arm.com (unknown [10.169.106.147]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F3A403F25D; Fri, 25 May 2018 01:37:55 -0700 (PDT) From: Phil Yang To: dts@dpdk.org Cc: nd@arm.com, yong.liu@intel.com Date: Fri, 25 May 2018 16:37:42 +0800 Message-Id: <1527237462-23959-1-git-send-email-phil.yang@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526378779-10530-2-git-send-email-phil.yang@arm.com> References: <1526378779-10530-2-git-send-email-phil.yang@arm.com> Subject: [dts] [PATCH v2] framework/qemu_kvm: replace nc with socat for vm control by socket X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 08:37:57 -0000 The nc process hang while connecting with unix domian socket. The problem could be resolved by replacing it with socat tool. Change-Id: If78dc387d306d7ad545637a5053cedf5430c806f Jira: ENTNET-773 Signed-off-by: Phil Yang --- framework/qemu_kvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index f24947d..37f35ce 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -990,7 +990,7 @@ class QEMUKvm(VirtBase): if getattr(self, 'control_session', None) is None: self.control_session = self.host_session - self.control_session.send_command("nc -U %s" % self.serial_path) + self.control_session.send_command("socat %s STDIO" % self.serial_path) # login message not ouput if timeout too small out = self.control_session.send_command("", timeout=5).replace('\r', '').replace('\n', '') @@ -1722,7 +1722,7 @@ class QEMUKvm(VirtBase): """ # return control_session to host_session if self.control_type == 'socket': - scan_cmd = "ps -e -o pid,cmd |grep 'nc -U %s' |grep -v grep" % self.serial_path + scan_cmd = "ps -e -o pid,cmd |grep 'socat %s STDIO' |grep -v grep" % self.serial_path out = self.host_dut.send_expect(scan_cmd, "#") proc_info = out.strip().split() try: -- 2.7.4