[dts] [PATCH v2 25/28] tests: unit_tests_dump - taking into account cavium NICs
Angela Czubak
aczubak at caviumnetworks.com
Mon Apr 10 19:09:19 CEST 2017
Testpmd must be run with hardware VLAN filter disabled as thunder
driver does not support this feature - --disable-hw-vlan-filter is
appended if NIC is Cavium device.
In test_ring_dump, matching the mbuf_pool is done against the first
element of group (instead of the last one), since it is the first group
matched.
Signed-off-by: Angela Czubak <aczubak at caviumnetworks.com>
---
tests/TestSuite_unit_tests_dump.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
index 0ec8d78..fa09894 100644
--- a/tests/TestSuite_unit_tests_dump.py
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -85,7 +85,10 @@ class TestUnitTestsDump(TestCase):
"""
Run history log dump test case.
"""
- self.dut.send_expect("./%s/app/testpmd -n 1 -c f -- -i" % (self.target), "testpmd>", self.start_test_time)
+ cmd = "./%s/app/testpmd -n 1 -c f -- -i"
+ if "cavium" in self.dut.nic_type:
+ cmd += " --disable-hw-vlan-filter"
+ self.dut.send_expect(cmd % (self.target), "testpmd>", self.start_test_time)
out = self.dut.send_expect("dump_ring", "testpmd>", self.run_cmd_time)
self.dut.send_expect("quit", "# ")
match_regex = "ring <(.*?)>@0x(.*)\r\n"
@@ -94,13 +97,16 @@ class TestUnitTestsDump(TestCase):
# Nic driver will create multiple rings.
# Only check the last one to make sure ring_dump function work.
- self.verify( 'MP_mbuf_pool_socket_0' in result[0][-1], "dump ring name failed")
+ self.verify( 'MP_mbuf_pool_socket_0' in result[0][0], "dump ring name failed")
def test_mempool_dump(self):
"""
Run mempool dump test case.
"""
- self.dut.send_expect("./%s/app/testpmd -n 1 -c f -- -i" % (self.target), "testpmd>", self.start_test_time)
+ cmd = "./%s/app/testpmd -n 1 -c f -- -i"
+ if "cavium" in self.dut.nic_type:
+ cmd += " --disable-hw-vlan-filter"
+ self.dut.send_expect(cmd % (self.target), "testpmd>", self.start_test_time)
out = self.dut.send_expect("dump_mempool", "testpmd>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
match_regex = "mempool <(.*?)>@0x(.*?)\r\n"
@@ -133,7 +139,10 @@ class TestUnitTestsDump(TestCase):
"""
Run memzone dump test case.
"""
- self.dut.send_expect("./%s/app/testpmd -n 1 -c f -- -i" % (self.target), "testpmd>", self.start_test_time)
+ cmd = "./%s/app/testpmd -n 1 -c f -- -i"
+ if "cavium" in self.dut.nic_type:
+ cmd += " --disable-hw-vlan-filter"
+ self.dut.send_expect(cmd % (self.target), "testpmd>", self.start_test_time)
out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
--
2.7.4
More information about the dts
mailing list