From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0171CA00E6 for ; Thu, 21 Mar 2019 04:16:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE3791B20E; Thu, 21 Mar 2019 04:16:24 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2BAB41B205 for ; Thu, 21 Mar 2019 04:16:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 20:16:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,251,1549958400"; d="scan'208";a="153682283" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 20 Mar 2019 20:16:20 -0700 From: yaobing To: dts@dpdk.org Cc: yaobing Date: Thu, 21 Mar 2019 11:20:20 +0800 Message-Id: <1553138420-72895-1-git-send-email-bingx.y.yao@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] tests/pmdrss_hash:change hard code 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" V1: change the corelist adapted to the actual cores instead of hard code V2: change hardcode of memory channel Signed-off-by: yaobing --- tests/TestSuite_pmdrss_hash.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py index 60c9819..dd22f91 100644 --- a/tests/TestSuite_pmdrss_hash.py +++ b/tests/TestSuite_pmdrss_hash.py @@ -464,7 +464,8 @@ class TestPmdrssHash(TestCase): """ Run before each test case. """ - pass + cores = self.dut.get_core_list("all") + self.coremask = utils.create_mask(cores) def test_toeplitz(self): dutPorts = self.dut.get_ports(self.nic) @@ -477,8 +478,8 @@ class TestPmdrssHash(TestCase): # test with different rss queues self.dut.send_expect( - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" % - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" % + (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) for iptype, rsstype in iptypes.items(): self.dut.send_expect("set verbose 8", "testpmd> ") @@ -514,8 +515,8 @@ class TestPmdrssHash(TestCase): # test with different rss queues self.dut.send_expect( - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" % - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" % + (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) for iptype, rsstype in iptypes.items(): self.dut.send_expect("set verbose 8", "testpmd> ") @@ -558,8 +559,8 @@ class TestPmdrssHash(TestCase): # test with different rss queues self.dut.send_expect( - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" % - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" % + (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) for iptype, rsstype in iptypes.items(): self.logger.info("***********************%s rss test********************************" % iptype) @@ -597,8 +598,8 @@ class TestPmdrssHash(TestCase): # test with different rss queues self.dut.send_expect( - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" % - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" % + (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120) for iptype, rsstype in iptypes.items(): self.dut.send_expect("set verbose 8", "testpmd> ") @@ -632,7 +633,7 @@ class TestPmdrssHash(TestCase): "fortpark_TLV", "fortville_25g"], "NIC Unsupported: " + str(self.nic)) - self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i" % self.target, "testpmd> ", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i" % (self.target, self.coremask, self.dut.get_memory_channels()), "testpmd> ", 120) out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30) bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip()) -- 2.17.2