test suite reviews and discussions
 help / color / mirror / Atom feed
From: Phil Yang <phil.yang@arm.com>
To: dts@dpdk.org
Cc: nd@arm.com, yong.liu@intel.com
Subject: [dts] [PATCH v2] framework/qemu_kvm: replace nc with socat for vm control by socket
Date: Fri, 25 May 2018 16:37:42 +0800	[thread overview]
Message-ID: <1527237462-23959-1-git-send-email-phil.yang@arm.com> (raw)
In-Reply-To: <1526378779-10530-2-git-send-email-phil.yang@arm.com>

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 <phil.yang@arm.com>
---
 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

  reply	other threads:[~2018-05-25  8:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 10:06 [dts] [PATCH 1/2] framework/qemu_kvm: fix vm control session failure Phil Yang
2018-05-15 10:06 ` [dts] [PATCH 2/2] framework/qemu_kvm: replace nc with socat for vm control by socket Phil Yang
2018-05-25  8:37   ` Phil Yang [this message]
2018-05-25 16:31     ` [dts] [PATCH v2] " Liu, Yong
2018-05-16  1:37 ` [dts] [PATCH 1/2] framework/qemu_kvm: fix vm control session failure Liu, Yong
2018-05-16  3:55   ` Phil Yang
2018-05-16  5:01     ` Liu, Yong
2018-05-16  5:22       ` Phil Yang
2018-05-16  6:37         ` Liu, Yong
2018-05-17 10:16           ` Phil Yang
2018-05-17 10:31 ` [dts] [PATCH v2] " Phil Yang
2018-05-18  5:11   ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527237462-23959-1-git-send-email-phil.yang@arm.com \
    --to=phil.yang@arm.com \
    --cc=dts@dpdk.org \
    --cc=nd@arm.com \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).