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 C2507A034F; Thu, 14 May 2020 23:19:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B32801D6A9; Thu, 14 May 2020 23:19:05 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 3FA561D5CD for ; Thu, 14 May 2020 23:19:04 +0200 (CEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04EL1nYN088383 for ; Thu, 14 May 2020 17:19:03 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3119db85hj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 May 2020 17:19:03 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 04ELHGqk000770 for ; Thu, 14 May 2020 21:19:02 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03wdc.us.ibm.com with ESMTP id 3100ubhws4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 May 2020 21:19:02 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 04ELJ0BR12255572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 May 2020 21:19:00 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9BDD6E06D; Thu, 14 May 2020 21:19:00 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A9AAA6E04C; Thu, 14 May 2020 21:19:00 +0000 (GMT) Received: from ltc17u1.stglabs.ibm.com (unknown [9.114.216.145]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 14 May 2020 21:19:00 +0000 (GMT) From: Thinh Tran To: dts@dpdk.org Cc: Thinh Tran Date: Thu, 14 May 2020 17:18:51 -0400 Message-Id: <20200514211851.73603-1-thinhtr@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-14_07:2020-05-14, 2020-05-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=1 mlxlogscore=944 spamscore=0 impostorscore=0 bulkscore=0 cotscore=-2147483648 lowpriorityscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 adultscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005140179 Subject: [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" We may got two exceptions that are raised one right after the other. It seems to be only in python3 failing to handling it. 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 111, in expect_loop incoming = 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. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 119, in expect_loop return self.timeout(e) File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 82, 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 (last 100 chars): '' ....... Signed-off-by: Thinh Tran --- framework/ssh_pexpect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: 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 def __sendline(self, command): if not self.isalive(): -- 2.17.0