test suite reviews and discussions
 help / color / Atom feed
* Re: [dts] [PATCH V1] tests: kernelpf_iavf fix some issues
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Zhao, MeijuanX @ 2019-08-16  6:34 UTC (permalink / raw)
  To: dts; +Cc: Zhao, MeijuanX

Tested-by: Zhao, MeijuanX <meijuanx.zhao@intel.com>

-----Original Message-----
From: Zhao, MeijuanX 
Sent: Friday, August 16, 2019 10:34 PM
To: dts@dpdk.org
Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
Subject: [dts][PATCH V1] tests: kernelpf_iavf fix some issues


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

* [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

* Re: [dts] [PATCH V1] tests: kernelpf_iavf fix some issues
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-08-28 10:46 UTC (permalink / raw)
  To: Zhao, MeijuanX, dts; +Cc: Zhao, MeijuanX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhaomeijuan
> Sent: Friday, August 16, 2019 10:34 PM
> To: dts@dpdk.org
> Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
> Subject: [dts] [PATCH V1] tests: kernelpf_iavf fix some issues
> 
> 
> *. 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, back to index

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

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox