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 081DEA04F0; Wed, 25 Dec 2019 07:33:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B374B1B203; Wed, 25 Dec 2019 07:33:38 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E5B663977 for ; Wed, 25 Dec 2019 07:33:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2019 22:33:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,353,1571727600"; d="scan'208";a="417736810" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by fmsmga005.fm.intel.com with ESMTP; 24 Dec 2019 22:33:35 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Wed, 25 Dec 2019 07:06:39 +0800 Message-Id: <1577228799-25999-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/tester: only restore ports if start trex in dts 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" Signed-off-by: lihong --- framework/tester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/tester.py b/framework/tester.py index 5b4aff0..7b05832 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -808,7 +808,9 @@ class Tester(Crb): if self.it_uses_external_generator(): if self.is_pktgen and self.pktgen: self.pktgen.quit_generator() - self.restore_trex_interfaces() + # only restore ports if start trex in dts + if 'start_trex' in self.pktgen.conf.keys(): + self.restore_trex_interfaces() self.pktgen = None elif self.ixia_packet_gen: self.ixia_packet_gen.close() -- 2.7.4