From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 847E75ADF for ; Fri, 23 Jan 2015 09:27:23 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 Jan 2015 00:27:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,453,1418112000"; d="scan'208";a="641467807" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 23 Jan 2015 00:27:22 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t0N8RJBV028248; Fri, 23 Jan 2015 16:27:19 +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 t0N8RH0L027175; Fri, 23 Jan 2015 16:27:19 +0800 Received: (from dayuqiu@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t0N8RHJM027171; Fri, 23 Jan 2015 16:27:17 +0800 From: Marvin Liu To: dts@dpdk.org Date: Fri, 23 Jan 2015 16:26:59 +0800 Message-Id: <1422001619-27112-5-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1422001619-27112-1-git-send-email-yong.liu@intel.com> References: <1422001619-27112-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 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: Fri, 23 Jan 2015 08:27:24 -0000 From: Yong Liu Signed-off-by: Marvinliu --- framework/dut.py | 6 +++--- 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 +- 16 files changed, 30 insertions(+), 31 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 959f499..1c8367d 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -148,11 +148,11 @@ class Dut(Crb): self.pci_devices_information() # scan ports before restore interface self.scan_ports() - # restore dut ports to kernel + # restore dut ports to kernel self.restore_interfaces() - # rescan ports after interface up + # rescan ports after interface up self.rescan_ports() - # load port infor from config file + # load port infor from config file self.load_portconf() self.mount_procfs() 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 9c56799..22c6766 100644 --- a/tests/TestSuite_ip_pipeline.py +++ b/tests/TestSuite_ip_pipeline.py @@ -293,7 +293,7 @@ class TestIPPipeline(TestCase): # Check for port availability self.needed_ports = {"niantic": 2} - 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 0e7df85..1b2bf0d 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 acd6364..a21977b 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -104,7 +104,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], @@ -162,7 +162,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