[dts] [PATCH v2] framework/qemu_kvm: fix vm control session failure
Phil Yang
phil.yang at arm.com
Thu May 17 12:31:04 CEST 2018
Fix telnet socket vm control shell_reg mismatch issue.
For socket vm control, added LOGIN_PROMPT into the login status
check for other platform.
Jira: ENTNET-773
Change-Id: I95fbb8b25563b706e6dc06217033d68aa3c76486
Signed-off-by: Phil Yang <phil.yang at arm.com>
---
framework/qemu_kvm.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index ec33669..89518a7 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -979,7 +979,7 @@ class QEMUKvm(VirtBase):
Connect to serial port and return connected session for usage
if connected failed will return None
"""
- shell_reg = r"(\s*)\[(.*)\]# "
+ shell_reg = r"(.*)# "
try:
if getattr(self, 'control_session', None) is None:
self.control_session = self.host_session
@@ -1025,7 +1025,7 @@ class QEMUKvm(VirtBase):
Connect to serial port and return connected session for usage
if connected failed will return None
"""
- shell_reg = r"(\s*)\[(.*)\]# "
+ shell_reg = r"(.*)# "
scan_cmd = "lsof -i:%d | grep telnet | awk '{print $2}'" % self.serial_port
try:
@@ -1058,7 +1058,7 @@ class QEMUKvm(VirtBase):
return True
# login into Redhat os, not sure can work on all distributions
- if "x86_64 on an x86_64" not in out:
+ if ("x86_64 on an x86_64" not in out) and (self.LOGIN_PROMPT not in out):
print RED("[%s:%s] not ready for login" % (self.host_dut.crb['My IP'], self.vm_name))
return False
else:
--
2.7.4
More information about the dts
mailing list