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 EB117A0093; Tue, 19 May 2020 04:00:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1CA21D565; Tue, 19 May 2020 04:00:33 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2F0921D55F for ; Tue, 19 May 2020 04:00:32 +0200 (CEST) IronPort-SDR: FymZdBSuaDeCy1fXIGKye0tD3T1tocosk8ISQz1tKSmHDziLRf1u1pD8018f0b3+7NsgkHrwkV H9pmFt5caTBA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 19:00:31 -0700 IronPort-SDR: e44KUN+FNot/pRm7aCjQRVluCuFjZSRmZrafsHJnq1HQHvt23qfdbOtXHxyf4guwTiwQSIbxcq 7wrgSYIMqEJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,408,1583222400"; d="scan'208";a="411469761" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 18 May 2020 19:00:31 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 19:00:30 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 19:00:30 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.177]) with mapi id 14.03.0439.000; Tue, 19 May 2020 10:00:27 +0800 From: "Tu, Lijuan" To: Thinh Tran , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] framework: handling _prompt and ssh exceptions Thread-Index: AQHWKjVbUoZpZ24erEKyTn4GbtHNw6iurhpQ Date: Tue, 19 May 2020 02:00:27 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC3EDF0@SHSMSX101.ccr.corp.intel.com> References: <20200514211851.73603-1-thinhtr@linux.vnet.ibm.com> In-Reply-To: <20200514211851.73603-1-thinhtr@linux.vnet.ibm.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] framework: handling _prompt and ssh exceptions 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 Thinh Tran > Sent: Friday, May 15, 2020 5:19 AM > To: dts@dpdk.org > Cc: Thinh Tran > Subject: [dts] [PATCH] framework: handling _prompt and ssh exceptions >=20 > We may got two exceptions that are raised one right after the other. > It seems to be only in python3 failing to handling it. >=20 > In this case are TIMEOUTs of the execution of a command and of the ssh > session: > ...... > raise TimeoutException(command, self.get_output_all()) > exception.TimeoutException: TIMEOUT on lsof -Fp > /var/run/dpdk/dpdk_73008_20200514164308/config > Error in atexit._run_exitfuncs: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 1= 11, > in expect_loop > incoming =3D spawn.read_nonblocking(spawn.maxread, timeout) > File "/usr/local/lib/python3.6/dist-packages/pexpect/pty_spawn.py", > line 509, in read_nonblocking > raise TIMEOUT('Timeout exceeded.') > pexpect.exceptions.TIMEOUT: Timeout exceeded. >=20 > During handling of the above exception, another exception occurred: >=20 > Traceback (most recent call last): > File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 1= 19, > in expect_loop > return self.timeout(e) > File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 8= 2, in > timeout > raise TIMEOUT(msg) > pexpect.exceptions.TIMEOUT: Timeout exceeded. > > command: /usr/bin/ssh > args: [b'/usr/bin/ssh', b'-q', b'-l', b'root', b'9.114.224.16'] buffer (l= ast 100 > chars): '' > ....... >=20 > Signed-off-by: Thinh Tran > --- > framework/ssh_pexpect.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index > df610c1..0230207 100644 > --- a/framework/ssh_pexpect.py > +++ b/framework/ssh_pexpect.py > @@ -133,7 +133,7 @@ class SSHPexpect: >=20 > def __prompt(self, command, timeout): > if not self.session.prompt(timeout): > - raise TimeoutException(command, self.get_output_all()) > + raise TimeoutException(command, self.get_output_all()) from > + None >=20 > def __sendline(self, command): > if not self.isalive(): > -- > 2.17.0