[dts] [PATCH v2] framework/qemu_kvm: replace nc with socat for vm control by socket
Phil Yang
phil.yang at arm.com
Fri May 25 10:37:42 CEST 2018
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 at 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
More information about the dts
mailing list