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 56F45A0471 for ; Wed, 17 Jul 2019 08:25:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EC1A2BC7; Wed, 17 Jul 2019 08:25:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4A76023D for ; Wed, 17 Jul 2019 08:25:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 23:25:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,273,1559545200"; d="scan'208";a="187491698" Received: from unknown (HELO debug193.icx.intel.com) ([10.240.176.193]) by fmsmga001.fm.intel.com with ESMTP; 16 Jul 2019 23:25:48 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Wed, 17 Jul 2019 15:21:10 +0000 Message-Id: <1563376870-42385-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues 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" 1. recover dpdk in test case 128_queues, instead of in tear_down. 2. verify test result after recover and rebuild dpdk. 3. change tab to space. Signed-off-by: Wenjie Li --- tests/TestSuite_generic_filter.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py index e7f480b..461db95 100644 --- a/tests/TestSuite_generic_filter.py +++ b/tests/TestSuite_generic_filter.py @@ -704,9 +704,11 @@ class TestGeneric_filter(TestCase): def test_128_queues(self): # testpmd can't support assign queue to received packet, so can't test + set_filter_flag = 1 + packet_flag = 1 if self.kdriver == "ixgbe": - self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30) - self.dut.build_install_dpdk(self.target) + self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30) + self.dut.build_install_dpdk(self.target) global valports total_mbufs = self.request_mbufs(128) * len(valports) self.pmdout.start_testpmd( @@ -730,11 +732,14 @@ class TestGeneric_filter(TestCase): if i == 2: out = self.dut.send_expect( "set stat_qmap rx %s %s %s" % (valports[0], queue[i], (i + 1)), "testpmd> ") - self.verify('Invalid RX queue %s' % - (queue[i]) in out, "set filters error") + if 'Invalid RX queue %s' % (queue[i]) not in out: + set_filter_flag = 0 + break out = self.dut.send_expect( "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port %s src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue %s " % (valports[0], (i + 1), queue[i]), "testpmd> ") - self.verify('error' in out, "set filters error") + if 'error' not in out: + set_filter_flag = 0 + break continue else: self.dut.send_expect("set stat_qmap rx %s %s %s" % @@ -753,10 +758,14 @@ class TestGeneric_filter(TestCase): scanner = re.compile(result_scanner, re.DOTALL) m = scanner.search(out) cur_pkt = m.group(1) - self.verify( - int(cur_pkt) == frames_to_send, "packet pass assert error") - + if int(cur_pkt) != frames_to_send: + packet_flag = 0 + break self.dut.send_expect("quit", "#") + self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30) + self.dut.build_install_dpdk(self.target) + self.verify(set_filter_flag == 1, "set filters error") + self.verify(packet_flag == 1, "packet pass assert error") else: self.verify(False, "%s not support this test" % self.nic) @@ -840,5 +849,6 @@ class TestGeneric_filter(TestCase): Run after each test case. """ self.dut.kill_all() - self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30) - self.dut.build_install_dpdk(self.target) + + def tear_down_all(self): + pass -- 2.17.1