[dts] [PATCH 4/4] tests: fix tope issue in suites
Marvin Liu
yong.liu at intel.com
Thu Aug 4 15:18:34 CEST 2016
Signed-off-by: Marvin Liu <yong.liu at intel.com>
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 7a05b6d..57069f0 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -63,12 +63,11 @@ class TestChecksumOffload(TestCase):
"""
Run before each test case.
"""
- if self.dut.want_func_tests:
- self.pmdout.start_testpmd("Default", "--portmask=%s " %
- (self.portMask) + "--disable-hw-vlan --enable-rx-cksum " +
- "--crc-strip --port-topology=loop", socket=self.ports_socket)
- self.dut.send_expect("set verbose 1", "testpmd>")
- self.dut.send_expect("set fwd csum", "testpmd>")
+ self.pmdout.start_testpmd("Default", "--portmask=%s " %
+ (self.portMask) + "--disable-hw-vlan --enable-rx-cksum " +
+ "--crc-strip --port-topology=loop", socket=self.ports_socket)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd csum", "testpmd>")
def checksum_enablehw(self, port):
self.dut.send_expect("csum set ip hw %d" % port, "testpmd>")
@@ -327,8 +326,7 @@ class TestChecksumOffload(TestCase):
"""
Run after each test case.
"""
- if self.dut.want_func_tests:
- self.dut.send_expect("quit", "#")
+ self.dut.send_expect("quit", "#")
def tear_down_all(self):
"""
diff --git a/tests/TestSuite_ipv4_reassembly.py b/tests/TestSuite_ipv4_reassembly.py
index a1e15a2..3f0e725 100644
--- a/tests/TestSuite_ipv4_reassembly.py
+++ b/tests/TestSuite_ipv4_reassembly.py
@@ -305,7 +305,7 @@ class TestIpReassembly(TestCase):
"""
sent_packets = self.number_of_sent_packets(self.test_config.mac_src)
- print 'sent packets: %d - expected: %d' % (sent_packets, expected)
+ self.logger.info('sent packets: %d - expected: %d' % (sent_packets, expected))
self.verify(sent_packets == expected, 'Not all fragments have been sent')
def verify_received_packets(self, expected):
@@ -314,7 +314,7 @@ class TestIpReassembly(TestCase):
"""
received_packets = self.number_of_received_packets(self.test_config.tcp_dst_port)
- print 'received packets: %d - expected: %d' % (received_packets, expected)
+ self.logger.info('received packets: %d - expected: %d' % (received_packets, expected))
self.verify(received_packets == expected,
'Not all frames have been forwarded')
@@ -324,7 +324,7 @@ class TestIpReassembly(TestCase):
"""
tcp_valid_checksum = self.number_of_tcp_valid_checksum(self.test_config.tcp_dst_port)
- print 'tcp valid: %d - expected: %d' % (tcp_valid_checksum, expected)
+ self.logger.info('tcp valid: %d - expected: %d' % (tcp_valid_checksum, expected))
self.verify(tcp_valid_checksum == expected,
'Not all TCP packets have valid checksum')
diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py
index 8b8b8ee..1b3f781 100644
--- a/tests/TestSuite_pmd_bonded.py
+++ b/tests/TestSuite_pmd_bonded.py
@@ -810,16 +810,12 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)'
"""
Run before each test case.
"""
- if self.dut.want_func_tests:
- self.launch_app()
- elif self.dut.want_perf_tests:
+ if self._enable_perf:
pmd_param = "--burst=32 --rxfreet=32 --mbcache=250 --txpt=32 \
--rxht=8 --rxwt=0 --txfreet=32 --txrst=32 --txqflags=0xf01"
self.launch_app(pmd_param)
else:
- self.verify(False,
- "Test type not etting," +
- "please check framework to set test type to be function or performance.")
+ self.launch_app()
def verify_bound_basic_opt(self, mode_set):
"""
--
1.9.3
More information about the dts
mailing list