From: zhaomeijuan <meijuanx.zhao@intel.com>
To: dts@dpdk.org
Cc: zhaomeijuan <meijuanx.zhao@intel.com>
Subject: [dts] [PATCH V1] tests: kernelpf_iavf fix some issues
Date: Fri, 16 Aug 2019 14:33:43 +0000 [thread overview]
Message-ID: <20190816143343.26596-1-meijuanx.zhao@intel.com> (raw)
*. 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
next reply other threads:[~2019-08-16 6:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 14:33 zhaomeijuan [this message]
2019-08-16 6:34 ` Zhao, MeijuanX
2019-08-28 10:46 ` Tu, Lijuan
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=20190816143343.26596-1-meijuanx.zhao@intel.com \
--to=meijuanx.zhao@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).