From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id A519D1B8AF for ; Tue, 15 May 2018 12:06:50 +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 038F815AB; Tue, 15 May 2018 03:06:50 -0700 (PDT) Received: from phil-VirtualBox.shanghai.arm.com (unknown [10.169.106.172]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3AF9E3F23C; Tue, 15 May 2018 03:06:49 -0700 (PDT) From: Phil Yang To: dts@dpdk.org Cc: nd@arm.com, phil.yang@arm.com, yong.liu@intel.com Date: Tue, 15 May 2018 18:06:19 +0800 Message-Id: <1526378779-10530-2-git-send-email-phil.yang@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526378779-10530-1-git-send-email-phil.yang@arm.com> References: <1526378779-10530-1-git-send-email-phil.yang@arm.com> Subject: [dts] [PATCH 2/2] 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: Tue, 15 May 2018 10:06:50 -0000 The nc process hang while connecting with unix domian socket. The problem could be resolved by replacing it with socat tool. 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 57d16f6..354cb44 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -984,7 +984,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=15).replace('\r', '').replace('\n', '') @@ -1717,7 +1717,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