From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83A8AA0583; Fri, 20 Mar 2020 09:23:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B0572BB9; Fri, 20 Mar 2020 09:23:44 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1F8322BB9 for ; Fri, 20 Mar 2020 09:23:42 +0100 (CET) IronPort-SDR: f0ggDZ7TmkzqWNumlcM8HuQeCIxn74NIIezwW/rkNVdi/eM9iifnSkwc2XBJ0wrTJq5OT2tZwU kvZtaswhtEtw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2020 01:23:42 -0700 IronPort-SDR: moJ9UINt6IjRwg3WVfvTl76+2C3x4YmnD8YCF6Thi+DooEdXgcBue7bNfLiYZkk9OBYrcKX0xx A6CLYvc0aiqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,283,1580803200"; d="scan'208";a="237172734" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 20 Mar 2020 01:23:42 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Mar 2020 01:23:40 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Mar 2020 01:23:40 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.86]) with mapi id 14.03.0439.000; Fri, 20 Mar 2020 16:23:38 +0800 From: "Tu, Lijuan" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH 1/2] framework: modify the method get_session_before Thread-Index: AQHV9avbcKCUMsyrZUSWAF5N0H+sGqhRNlpQ Date: Fri, 20 Mar 2020 08:23:38 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEFBB9@SHSMSX101.ccr.corp.intel.com> References: <20200308152309.46637-1-xinfengx.zhao@intel.com> In-Reply-To: <20200308152309.46637-1-xinfengx.zhao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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 1/2] framework: modify the method get_session_before 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xinfengx > Sent: Sunday, March 8, 2020 11:23 PM > To: dts@dpdk.org > Cc: Zhao, XinfengX > Subject: [dts] [PATCH 1/2] framework: modify the method > get_session_before >=20 > Signed-off-by: xinfengx > --- > framework/ssh_pexpect.py | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) >=20 > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index > 8889016..e851cbf 100644 > --- a/framework/ssh_pexpect.py > +++ b/framework/ssh_pexpect.py > @@ -109,16 +109,11 @@ class SSHPexpect: > """ > ignore_keyintr() > self.session.PROMPT =3D self.magic_prompt > - try: > - self.session.prompt(timeout) > - except Exception as e: > - pass > - > + output =3D self.session.try_read_prompt(timeout) > aware_keyintr() > - before =3D self.get_output_all() > self.__flush() >=20 > - return before > + return output >=20 > def __flush(self): > """ > -- > 2.17.1