From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 56E98ADA6 for ; Wed, 4 Feb 2015 07:44:11 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 03 Feb 2015 22:40:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,517,1418112000"; d="scan'208";a="522266792" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 03 Feb 2015 22:36:31 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t146i6FP005747; Wed, 4 Feb 2015 14:44:06 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t146i4Td019920; Wed, 4 Feb 2015 14:44:06 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t146i4NN019916; Wed, 4 Feb 2015 14:44:04 +0800 From: Yong Liu To: dts@dpdk.org Date: Wed, 4 Feb 2015 14:43:34 +0800 Message-Id: <1423032214-19856-5-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1423032214-19856-1-git-send-email-yong.liu@intel.com> References: <1423032214-19856-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH v2 4/4] suites: remove nic type check from testsuites 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: , X-List-Received-Date: Wed, 04 Feb 2015 06:44:12 -0000 For all nic in execution file will be used for validation. There's no need to check nic type in test suites. Signed-off-by: Marvinliu --- tests/TestSuite_blacklist.py | 2 +- tests/TestSuite_checksum_offload.py | 2 +- tests/TestSuite_fdir.py | 16 ++++++++-------- tests/TestSuite_ieee1588.py | 6 +++--- tests/TestSuite_ip_pipeline.py | 2 +- tests/TestSuite_ipfrag.py | 2 +- tests/TestSuite_jumboframes.py | 2 +- tests/TestSuite_l2fwd.py | 2 +- tests/TestSuite_l3fwd.py | 6 +++--- tests/TestSuite_link_flowctrl.py | 2 +- tests/TestSuite_multiprocess.py | 2 +- tests/TestSuite_pmd.py | 4 ++-- tests/TestSuite_pmd_bonded.py | 2 +- tests/TestSuite_vlan.py | 3 +-- tests/TestSuite_whitelist.py | 2 +- 15 files changed, 27 insertions(+), 28 deletions(-) diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py index 65c1ec6..8e9debd 100644 --- a/tests/TestSuite_blacklist.py +++ b/tests/TestSuite_blacklist.py @@ -54,7 +54,7 @@ class TestBlacklist(TestCase): Two Ports """ - self.ports = self.dut.get_ports(self.nic) + self.ports = self.dut.get_ports() self.verify(len(self.ports) >= 2, "Insufficient ports for testing") [arch, machine, self.env, toolchain] = self.target.split('-') diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 1ebac0f..05438b2 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -54,7 +54,7 @@ class TestChecksumOffload(TestCase): Checksum offload prerequisites. """ # Based on h/w type, choose how many ports to use - self.dut_ports = self.dut.get_ports_performance(self.nic) + self.dut_ports = self.dut.get_ports_performance() # Verify that enough ports are available self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing") diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index a9f7fa3..1c8d8f7 100644 --- a/tests/TestSuite_fdir.py +++ b/tests/TestSuite_fdir.py @@ -48,7 +48,7 @@ class TestFdir(TestCase): """ Run at the start of each test suite. """ - ports = self.dut.get_ports(self.nic) + ports = self.dut.get_ports() self.verify(len(ports) >= 2, "Not enough ports available") self.pmdout = PmdOutput(self.dut) @@ -81,7 +81,7 @@ class TestFdir(TestCase): Setting memory reserved for FDir filters. """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() self.pmdout.start_testpmd("all", "--rxq=2 --txq=2 --disable-rss --pkt-filter-mode=perfect --pkt-filter-size=64K") out = self.dut.send_expect("show port fdir %s" % dutPorts[0], "testpmd>") @@ -111,7 +111,7 @@ class TestFdir(TestCase): - Send the ``p_udp`` packet with Scapy on the traffic generator and check that FDir information is printed """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -173,7 +173,7 @@ class TestFdir(TestCase): - Send the packet and validate the filter function. """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -230,7 +230,7 @@ class TestFdir(TestCase): - Send the packet and validate the perfect filter function. """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -261,7 +261,7 @@ class TestFdir(TestCase): fields, or parts of fields are used in the matching process. """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -306,7 +306,7 @@ class TestFdir(TestCase): to the bytes at offset 36 and 37, as the offset is in 2-byte units """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -335,7 +335,7 @@ class TestFdir(TestCase): FDir VLAN field filtering """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py index c6fdd61..bf48188 100644 --- a/tests/TestSuite_ieee1588.py +++ b/tests/TestSuite_ieee1588.py @@ -52,7 +52,7 @@ class TestIeee1588(TestCase): IEEE1588 Prerequisites """ - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() self.verify(len(dutPorts) > 0, "No ports found for " + self.nic) # Change the config file to support IEEE1588 and recompile the package. @@ -82,7 +82,7 @@ class TestIeee1588(TestCase): time.sleep(1) # Allow the output from the "start" command to finish before looking for a regexp in expect # use the first port on that self.nic - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() port = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(port) @@ -125,7 +125,7 @@ class TestIeee1588(TestCase): time.sleep(3) # use the first port on that self.nic - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() port = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(port) diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py index 7da393e..46fdc8d 100644 --- a/tests/TestSuite_ip_pipeline.py +++ b/tests/TestSuite_ip_pipeline.py @@ -297,7 +297,7 @@ class TestIPPipeline(TestCase): "I217LM": 1, "I218V": 1, "I218LM": 1} - self.dut_ports = self.dut.get_ports(self.nic) + self.dut_ports = self.dut.get_ports() self.verify(len(self.dut_ports) >= self.needed_ports[self.nic], "Insufficient ports for speed testing") diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py index 1f08c85..22a24a6 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -81,7 +81,7 @@ class TestIpfrag(TestCase): """ # Based on h/w type, choose how many ports to use - ports = self.dut.get_ports(self.nic) + ports = self.dut.get_ports() print ports # Verify that enough ports are available diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py index 2b862af..83b3427 100644 --- a/tests/TestSuite_jumboframes.py +++ b/tests/TestSuite_jumboframes.py @@ -113,7 +113,7 @@ class TestJumboframes(TestCase): Prerequisite steps for each test suit. """ - self.dut_ports = self.dut.get_ports(self.nic) + self.dut_ports = self.dut.get_ports() self.verify(len(self.dut_ports) >= 2, "Insufficient ports") self.rx_port = self.dut_ports[0] self.tx_port = self.dut_ports[1] diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py index b75163c..5c79cbf 100644 --- a/tests/TestSuite_l2fwd.py +++ b/tests/TestSuite_l2fwd.py @@ -83,7 +83,7 @@ class TestL2fwd(TestCase): self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip'] + \ HEADER_SIZE['udp'] - self.dut_ports = self.dut.get_ports_performance(self.nic) + self.dut_ports = self.dut.get_ports_performance() self.verify(len(self.dut_ports) >= self.number_of_ports, "Not enough ports for " + self.nic) diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index f590a52..65fa6f7 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -309,9 +309,9 @@ class TestL3fwd(TestCase): L3fwd Prerequisites """ # Based on h/w type, choose how many ports to use - ports = self.dut.get_ports(self.nic, socket=1) + ports = self.dut.get_ports(socket=1) if not ports: - ports = self.dut.get_ports(self.nic, socket=0) + ports = self.dut.get_ports(socket=0) # Verify that enough ports are available self.verify(len(ports) >= 2, "Insufficient ports for speed testing") @@ -473,7 +473,7 @@ class TestL3fwd(TestCase): """ # Based on h/w type, choose how many ports to use - ports = self.dut.get_ports(self.nic) + ports = self.dut.get_ports() # Verify that enough ports are available self.verify(len(ports) >= 4, "Insufficient ports for speed testing") diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py index 3c195c9..e52f95a 100644 --- a/tests/TestSuite_link_flowctrl.py +++ b/tests/TestSuite_link_flowctrl.py @@ -64,7 +64,7 @@ class TestLinkFlowctrl(TestCase): Link flow control Prerequisites """ - self.dutPorts = self.dut.get_ports(self.nic) + self.dutPorts = self.dut.get_ports() self.verify(len(self.dutPorts) > 1, "Insuficient ports") self.rx_port = self.dutPorts[0] diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py index 2c8eeba..4ef5313 100644 --- a/tests/TestSuite_multiprocess.py +++ b/tests/TestSuite_multiprocess.py @@ -191,7 +191,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator): """ self.dut.kill_all() self.dut.send_expect("fg", "# ") - dutPorts = self.dut.get_ports(self.nic) + dutPorts = self.dut.get_ports() txPort = self.tester.get_local_port(dutPorts[0]) rxPort = self.tester.get_local_port(dutPorts[1]) mac = self.tester.get_mac(txPort) diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index b88352f..c5b7e3b 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -108,7 +108,7 @@ class TestPmd(TestCase): "NIC Unsupported: " + str(self.nic)) # Based on h/w type, choose how many ports to use - self.dut_ports = self.dut.get_ports(self.nic) + self.dut_ports = self.dut.get_ports() # Verify that enough ports are available self.verify(len(self.dut_ports) >= self.needed_ports[self.nic], @@ -166,7 +166,7 @@ class TestPmd(TestCase): queues = 1 core_mask = dts.create_mask(core_list) - port_mask = dts.create_mask(self.dut.get_ports(self.nic)) + port_mask = dts.create_mask(self.dut.get_ports()) self.pmdout.start_testpmd("all", "--coremask=%s --rxq=%d --txq=%d --portmask=%s" % (core_mask, queues, queues, port_mask)) diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py index e8e61dd..fd15c1d 100644 --- a/tests/TestSuite_pmd_bonded.py +++ b/tests/TestSuite_pmd_bonded.py @@ -792,7 +792,7 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)' self.ip_head_size = 20 self.udp_header_size = 8 - self.dut_ports = self.dut.get_ports(self.nic) + self.dut_ports = self.dut.get_ports() self.port_mask = dts.create_mask(self.dut_ports) diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index e9813f3..66dc4f3 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -53,12 +53,11 @@ class TestVlan(TestCase): """ # Based on h/w type, choose how many ports to use - ports = self.dut.get_ports(self.nic) + ports = self.dut.get_ports() # Verify that enough ports are available self.verify(len(ports) >= 2, "Insufficient ports") - ports = self.dut.get_ports(self.nic) global valports valports = [_ for _ in ports if self.tester.get_local_port(_) != -1] diff --git a/tests/TestSuite_whitelist.py b/tests/TestSuite_whitelist.py index a32251d..aedae40 100644 --- a/tests/TestSuite_whitelist.py +++ b/tests/TestSuite_whitelist.py @@ -55,7 +55,7 @@ class TestWhitelist(TestCase): self.frames_to_send = 1 # Based on h/w type, choose how many ports to use - self.dutPorts = self.dut.get_ports(self.nic) + self.dutPorts = self.dut.get_ports() # Verify that enough ports are available self.verify(len(self.dutPorts) >= 1, "Insufficient ports") -- 1.9.3