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 40035A04C1; Tue, 26 Nov 2019 09:33:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FB664C90; Tue, 26 Nov 2019 09:33:03 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 878892A5D for ; Tue, 26 Nov 2019 09:33:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 00:32:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,245,1571727600"; d="scan'208";a="220559028" Received: from unknown (HELO dpdk-wenjielx-KVM190.icx.intel.com) ([10.238.54.190]) by orsmga002.jf.intel.com with ESMTP; 26 Nov 2019 00:32:56 -0800 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Tue, 26 Nov 2019 17:18:43 +0000 Message-Id: <1574788723-61123-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time 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" It is unnecessary to start/close scapy when sending every packet. The execution time could be reduced to 1 minute from 9. Signed-off-by: Wenjie Li --- tests/TestSuite_interrupt_pmd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py index a0467bd..4e99cf4 100644 --- a/tests/TestSuite_interrupt_pmd.py +++ b/tests/TestSuite_interrupt_pmd.py @@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase): """ Send a packet to port """ + self.tester.send_expect("scapy", ">>>", 30) for i in range(len(self.dut_ports[:portnum])): for j in range(num): txport = self.tester.get_local_port(self.dut_ports[i]) mac = self.dut.get_mac_address(self.dut_ports[i]) txItf = self.tester.get_interface(txport) - self.tester.scapy_append( - 'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf)) - self.tester.scapy_execute() + self.tester.send_expect('sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf), ">>>") + self.tester.send_expect("quit()", "#", 30) def tear_down(self): """ Run after each test case. """ + self.dut.kill_all() pass def tear_down_all(self): -- 2.17.1