test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests: kernelpf_iavf fix some issues
@ 2019-08-16 14:33 zhaomeijuan
  2019-08-16  6:34 ` Zhao, MeijuanX
  2019-08-28 10:46 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: zhaomeijuan @ 2019-08-16 14:33 UTC (permalink / raw)
  To: dts; +Cc: zhaomeijuan


*. change verify result 
*. add wait time due to receive large pkt 
*. fix syntax error 
*. remove useless setting for testpmd

Signed-off-by: zhaomeijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_kernelpf_iavf.py | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 2e500fa..476b899 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -245,7 +245,7 @@ class TestKernelpfIavf(TestCase):
         stats = self.vm_testpmd.get_pmd_stats(0)
         cap_tcp_num = re.findall('(\d+) packets', cap_packet)
         nums = sum(map(int,cap_tcp_num))
-        self.verify(stats['TX-packets'] !=0 and nums > stats['TX-packets'], 'vf send packet num is not match')
+        self.verify(stats['TX-packets'] !=0 and nums > 0, 'vf send packet num is not match')
 
     def test_vf_mac_filter(self):
         """
@@ -521,22 +521,20 @@ class TestKernelpfIavf(TestCase):
 
         self.vm_testpmd.start_testpmd("all")
         self.vm_testpmd.execute_cmd("set fwd mac")
-        self.vm_testpmd.execute_cmd("set promisc all off")
         self.vm_testpmd.execute_cmd("start")
         self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1, True)
         self.jumboframes_send_packet(ETHER_STANDARD_MTU + 1, False)
-        self.tester.send_expect("ifconfig %s mtu %s" % (self.tester_intf, ETHER_STANDARD_MTU))
+        self.tester.send_expect("ifconfig %s mtu %s" % (self.tester_intf, ETHER_STANDARD_MTU), "#")
 
     def test_vf_with_jumboframe(self):
         self.tester.send_expect('ifconfig %s mtu %d' % (self.tester_intf, ETHER_JUMBO_FRAME_MTU), '#')
         conf_pkt_len = 3000
-        self.vm_testpmd.start_testpmd("all", "--max-pkt-len=%d" % conf_pkt_len)
+        self.vm_testpmd.start_testpmd("all", "--max-pkt-len=%d --port-topology=loop --tx-offloads=0x8000" % conf_pkt_len)
         self.vm_testpmd.execute_cmd("set fwd mac")
-        self.vm_testpmd.execute_cmd("set promisc all off")
         self.vm_testpmd.execute_cmd("start")
         self.jumboframes_send_packet(conf_pkt_len - 1, True)
         self.jumboframes_send_packet(conf_pkt_len + 1, False)
-        self.tester.send_expect("ifconfig %s mtu %d" % (self.tester_intf, ETHER_STANDARD_MTU))
+        self.tester.send_expect("ifconfig %s mtu %d" % (self.tester_intf, ETHER_STANDARD_MTU), "#")
 
     def jumboframes_send_packet(self, pktsize, received=True):
         """
@@ -563,11 +561,11 @@ class TestKernelpfIavf(TestCase):
         if received:
             self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert error")
 
-            self.verify(rx_bytes == pktsize, "Rx packet size should be packet size")
+            self.verify(rx_bytes + 4 == pktsize, "Rx packet size should be packet size")
 
-            self.verify(tx_bytes == pktsize, "Tx packet size should be packet size")
+            self.verify(tx_bytes + 4 == pktsize, "Tx packet size should be packet size")
         else:
-            self.verify(rx_err == 1 or tx_pkts == 0, "Packet drop assert error")
+            self.verify(rx_err == 1 or tx_pkts == -1, "Packet drop assert error")
 
     def test_vf_rss(self):
         self.vm_testpmd.start_testpmd("all", "--txq=4 --rxq=4")
@@ -714,7 +712,7 @@ class TestKernelpfIavf(TestCase):
                       'Raw(RandString(5214))], iface="%s")' % (self.vf_mac, self.tester_intf)
         self.tester.scapy_append(pkt)
         self.tester.scapy_execute()
-        time.sleep(2)
+        time.sleep(5)
         out = self.get_tcpdump_package()
         self.verify_packet_segmentation(out)
         self.vm_testpmd.execute_cmd("stop")
@@ -726,7 +724,7 @@ class TestKernelpfIavf(TestCase):
         self.start_tcpdump(self.tester_intf)
         self.tester.scapy_append(pkt)
         self.tester.scapy_execute()
-        time.sleep(2)
+        time.sleep(5)
         out = self.get_tcpdump_package()
         self.verify_packet_segmentation(out, seg=False)
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-28 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 14:33 [dts] [PATCH V1] tests: kernelpf_iavf fix some issues zhaomeijuan
2019-08-16  6:34 ` Zhao, MeijuanX
2019-08-28 10:46 ` Tu, Lijuan

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).