From patchwork Wed Oct 21 18:11:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Tran X-Patchwork-Id: 81708 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46C43A04DD; Wed, 21 Oct 2020 20:12:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CFDE16E; Wed, 21 Oct 2020 20:11:56 +0200 (CEST) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id B42C769F8 for ; Wed, 21 Oct 2020 20:11:53 +0200 (CEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LI72xc043591 for ; Wed, 21 Oct 2020 14:11:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=wZek/rD7crRBVda4uurRd4YlfT68wzZaMp+YqCtwows=; b=hEjExUb77IjZfoFgWYNV/3XChWp1xrn2Bp7hZrtWjBM9eKbNM1BVT2ig8vjkE7STsWdo DDovXsHG8hom5Y07Y78BTOxNjrRopxnrKoGjNH/DtABScze+U2iWBvNBQlZ7zZIX4FG2 c7/VSoI9nXWW/rUefVEx8h7mGAr7iuP9KNC3bymwEp/LnHZQPvASXDHlHm/fzr8FuMth UnkqmJEpR4PmmTCS5ncEsYpIRtW/UHGYO6jDfJPaWjpvt6fOL8dN3HzetmKGW0KRKUKX zRI85mnwyuTw24zRFhC2Xzsh2U8mhrNHRWE5OJt8jhzS9TcGwAGljs5Tfrrzs6f6pg7f jg== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 34aqybv7xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 14:11:53 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LI47Kw029713 for ; Wed, 21 Oct 2020 18:11:52 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 347r89jgs3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 18:11:52 +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 09LIBk4630736814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 18:11:46 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24BF06E04E; Wed, 21 Oct 2020 18:11:51 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA7A66E053; Wed, 21 Oct 2020 18:11:50 +0000 (GMT) Received: from ltc17u1.stglabs.ibm.com (unknown [9.114.216.145]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 18:11:50 +0000 (GMT) From: Thinh Tran To: dts@dpdk.org Cc: thinhtr@linux.vnet.ibm.com Date: Wed, 21 Oct 2020 14:11:46 -0400 Message-Id: <20201021181146.125603-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.235, 18.0.737 definitions=2020-10-21_09:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 phishscore=0 mlxlogscore=757 adultscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=1 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210127 Subject: [dts] [PATCH] framework/tester closing scapy session raise exception 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" Sending control "^c" during closing the scapy sessions raised the time- out exception for expecting scapy prompt ">>> " return causing the failure during setup. Simply sending "quit" to exit scapy gratefully instead. Signed-off-by: Thinh Tran --- framework/tester.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/tester.py b/framework/tester.py index ca179b2..a7a68b5 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -868,8 +868,7 @@ class Tester(Crb): if self.scapy_sessions_li: for i in self.scapy_sessions_li: if i.session.isalive(): - i.session.send_expect("^c", ">>> ", timeout=2) - i.session.send_expect("^d", "#", timeout=2) + i.session.send_expect("quit", "# ", timeout=2) i.session.close() self.scapy_sessions_li.clear()