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 9B439A0583; Fri, 20 Mar 2020 06:07:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64D7C2BB9; Fri, 20 Mar 2020 06:07:42 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9828EF90 for ; Fri, 20 Mar 2020 06:07:40 +0100 (CET) IronPort-SDR: kPtEnB1jK/ZSn+GGL6GsV1mZZ9LQl+GfrYhr4dyYiDzZbwt5tmQYlrXJib7QKNYgofpsgN/bcl dIbEH3pwyTKA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2020 22:07:39 -0700 IronPort-SDR: h6mJ3mioly/Eg9PV8jtkj4cA10hKHhjyA2scQ1V8BqhOBnhsWPZXq2LZQ6S0CPfa4NcAzkBZCb cVh/FjSfNUUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,283,1580803200"; d="scan'208";a="356307373" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 19 Mar 2020 22:07:39 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Mar 2020 22:07:38 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 20 Mar 2020 13:07:36 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Fri, 20 Mar 2020 13:07:36 +0800 From: "Xiao, QimaiX" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH 1/2] framework: modify the method get_session_before Thread-Index: AQHV9avaaZYkLxfrMEWgJaTKgG2aJqhQ/14A Date: Fri, 20 Mar 2020 05:07:36 +0000 Message-ID: References: <20200308152309.46637-1-xinfengx.zhao@intel.com> In-Reply-To: <20200308152309.46637-1-xinfengx.zhao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] 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" Tested-by: Xiao, QimaiX Regards, Xiao Qimai > -----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