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 7FFFAA0540; Sun, 19 Jul 2020 15:09:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55C381BF98; Sun, 19 Jul 2020 15:09:48 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2DC562BC8 for ; Sun, 19 Jul 2020 15:09:47 +0200 (CEST) IronPort-SDR: +z8rvVzEypvw7Qh2+tKUz/Iyunbr397xRy4xnCsVM7NniP2nnZpzGC3SMOqalL04iYgTnvg0Oy QFxNiEQialPg== X-IronPort-AV: E=McAfee;i="6000,8403,9686"; a="147302676" X-IronPort-AV: E=Sophos;i="5.75,370,1589266800"; d="scan'208";a="147302676" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2020 06:09:46 -0700 IronPort-SDR: G0czTYpYizCLC3tuTEAZ0Ov3iIvBVhRItwsOSgsTf1PAifdz2OaQa5JQI8QtHuU4U5RQDq7yT2 /1sXFlywRJ5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,370,1589266800"; d="scan'208";a="271214249" Received: from dpdk-lunannan.sh.intel.com ([10.67.111.68]) by fmsmga008.fm.intel.com with ESMTP; 19 Jul 2020 06:09:45 -0700 From: Nannan Lu To: dts@dpdk.org Cc: Nannan Lu Date: Sun, 19 Jul 2020 22:02:24 +0000 Message-Id: <1595196144-360850-1-git-send-email-nannan.lu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] tests: Optimize the send_and_check_packets function of cvl_switch_filter 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" Optimize the send_and_check_packets function of TestSuite_cvl_switch_filter.py to increase the speed of sending packets. Signed-off-by: Nannan Lu --- tests/TestSuite_cvl_switch_filter.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py index dc54fe7..01a2842 100644 --- a/tests/TestSuite_cvl_switch_filter.py +++ b/tests/TestSuite_cvl_switch_filter.py @@ -2559,17 +2559,13 @@ class SwitchFilterTest(TestCase): """ #Specify the port to use dic["check_func"]["param"]["expect_port"] = port - self.dut.send_expect("start", "testpmd> ", 15) time.sleep(2) - #send packets - for per_packet in dic["scapy_str"]: - pkt = Packet(pkt_str=per_packet) - pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1) - - out = self.dut.send_expect("stop", "testpmd> ") - + self.pkt.update_pkt(dic["scapy_str"]) + self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) + time.sleep(3) + out = self.dut.send_expect("stop", "testpmd> ", 15) result_flag, log_msg = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"]) return result_flag, log_msg -- 2.25.1