From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 02037AA99 for ; Fri, 18 May 2018 07:11:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2018 22:11:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,413,1520924400"; d="scan'208";a="41938112" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 17 May 2018 22:11:24 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 22:11:24 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 22:11:23 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.6]) with mapi id 14.03.0319.002; Fri, 18 May 2018 13:11:22 +0800 From: "Liu, Yong" To: "phil.yang@arm.com" , "dts@dpdk.org" CC: "nd@arm.com" Thread-Topic: [PATCH v2] framework/qemu_kvm: fix vm control session failure Thread-Index: AQHT7cpGYp+JAquFi0KIcFRSaCBwpaQ08axw Date: Fri, 18 May 2018 05:11:21 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6304503E@SHSMSX103.ccr.corp.intel.com> References: <1526378779-10530-1-git-send-email-phil.yang@arm.com> <1526553064-19939-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1526553064-19939-1-git-send-email-phil.yang@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzNkMWI4NTYtMGIwOS00M2I1LWFjM2UtYTQ0YzhhY2IxMGIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSUo5ZXlaN1RJNzVDSXBVa2ZsTVJHRmNDREc4aVwvYXM1UlJyOG56UFZqT1pURzFDZlwvWHZcL1g2d2NJbVpvU1VDSyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v2] framework/qemu_kvm: fix vm control session failure 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, 18 May 2018 05:11:26 -0000 Thanks, Phil. Applied. > -----Original Message----- > From: phil.yang@arm.com [mailto:phil.yang@arm.com] > Sent: Thursday, May 17, 2018 6:31 PM > To: dts@dpdk.org > Cc: nd@arm.com; Liu, Yong > Subject: [PATCH v2] framework/qemu_kvm: fix vm control session failure >=20 > Fix telnet socket vm control shell_reg mismatch issue. >=20 > For socket vm control, added LOGIN_PROMPT into the login status > check for other platform. >=20 > Jira: ENTNET-773 > Change-Id: I95fbb8b25563b706e6dc06217033d68aa3c76486 > Signed-off-by: Phil Yang > --- > framework/qemu_kvm.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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 =3D r"(\s*)\[(.*)\]# " > + shell_reg =3D r"(.*)# " > try: > if getattr(self, 'control_session', None) is None: > self.control_session =3D 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 =3D r"(\s*)\[(.*)\]# " > + shell_reg =3D r"(.*)# " > scan_cmd =3D "lsof -i:%d | grep telnet | awk '{print $2}'" % > self.serial_port >=20 > try: > @@ -1058,7 +1058,7 @@ class QEMUKvm(VirtBase): > return True >=20 > # 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