From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH 4/4] suites: remove nic type check from testsuites
Date: Fri, 23 Jan 2015 16:26:59 +0800 [thread overview]
Message-ID: <1422001619-27112-5-git-send-email-yong.liu@intel.com> (raw)
In-Reply-To: <1422001619-27112-1-git-send-email-yong.liu@intel.com>
From: Yong Liu <yong.liu@intel.com>
Signed-off-by: Marvinliu <yong.liu@intel.com>
---
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
next prev parent reply other threads:[~2015-01-23 8:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 8:26 [dts] [PATCH 0/4] Support additional port configuration file Marvin Liu
2015-01-23 8:26 ` [dts] [PATCH 1/4] framework: add new module for load " Marvin Liu
2015-02-04 3:26 ` Qiu, Michael
2015-02-04 4:51 ` Liu, Yong
2015-01-23 8:26 ` [dts] [PATCH 2/4] framework: execuction file support port config nic_type Marvin Liu
2015-02-04 3:57 ` Qiu, Michael
2015-01-23 8:26 ` [dts] [PATCH 3/4] framework: reorganize DUT and Tester port initialize sequence Marvin Liu
2015-02-04 3:56 ` Qiu, Michael
2015-02-04 5:24 ` Liu, Yong
2015-01-23 8:26 ` Marvin Liu [this message]
2015-02-04 3:57 ` [dts] [PATCH 4/4] suites: remove nic type check from testsuites Qiu, Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422001619-27112-5-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).