From patchwork Wed Jul 12 14:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 129486 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC49842E4E; Wed, 12 Jul 2023 07:59:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5E9740A7D; Wed, 12 Jul 2023 07:59:38 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id E686C406BA for ; Wed, 12 Jul 2023 07:59:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689141577; x=1720677577; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=npyeVDkz9IneaYkwnmLvu0RbM5NzYflPGBH/KY6PZdY=; b=Vwnk66JA8fKuPyTO1PFzvxZNxMQ5R5iUb6o8sH9zNqEln5QF1na/JUPq LR2uF5C3dQDG24u5dy9pznekE2r+6eHAMKC+mYzDEzdQJyMLHEeQ0wqx5 yKdkAqXuNHcEwY7EOGWRtx02YduuvW7tKDMFC9E//0EUJ9V2u0KAlo4f2 WIX5Z8XzoVz1U9sNZwMaddrqzVI+9lFceruRHBkOYe15oxGplstzZULaZ JFWtNITUrQjhmXigpXCCB5FfSrmj4XgpRihcDuObQPm+5oe1noiw/3jZ/ bvfl7ekHfDc29g8huqtYyrotGhh2dq6c1h7GD1XqgwHtgxHWWTXtATWiL w==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="349662233" X-IronPort-AV: E=Sophos;i="6.01,198,1684825200"; d="scan'208";a="349662233" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 22:59:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="865993122" X-IronPort-AV: E=Sophos;i="6.01,198,1684825200"; d="scan'208";a="865993122" Received: from unknown (HELO dpdk.sh.intel.com) ([10.239.252.241]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 22:59:34 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] framework/tester: optimize scripts Date: Wed, 12 Jul 2023 22:14:06 +0800 Message-Id: <20230712141406.978846-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 timed out execution of Scapy "quit()" command will cause dts to end running. method of reducing command timeout: 1. increase timeout time. 2. ensure that the "quit()" command line is executed in scapy. Signed-off-by: Jiale Song --- framework/tester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/tester.py b/framework/tester.py index 5e6c72ad..d577c29e 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -866,7 +866,9 @@ class Tester(Crb): if self.scapy_sessions_li: for i in self.scapy_sessions_li: if i.session.isalive(): - i.session.send_expect("quit()", "#", timeout=2) + out = i.session.send_command("^C") + if ">>>" in out: + i.session.send_expect("quit()", "# ", timeout=5) i.session.close() self.scapy_sessions_li.clear()