test suite reviews and discussions
 help / color / Atom feed
* Re: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility
  2019-10-29 13:57 [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility Xiaoxiao Zeng
@ 2019-10-29  2:00 ` Zhang, YanX A
  2019-11-05  2:00 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, YanX A @ 2019-10-29  2:00 UTC (permalink / raw)
  To: Zeng, XiaoxiaoX, dts; +Cc: Zeng, XiaoxiaoX

[-- Attachment #1: Type: text/plain, Size: 3570 bytes --]

Tested-by:  Zhang, YanX A <yanx.a.zhang@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiaoxiao Zeng
Sent: Tuesday, October 29, 2019 9:58 PM
To: dts@dpdk.org
Cc: Zeng, XiaoxiaoX <xiaoxiaox.zeng@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility

*.change -b to -w.
*.modify verify to suit more scenes.

Signed-off-by: Xiaoxiao Zeng <xiaoxiaox.zeng@intel.com>
---
 tests/TestSuite_sriov_kvm.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py index 51fdf68..546b01c 100644
--- a/tests/TestSuite_sriov_kvm.py
+++ b/tests/TestSuite_sriov_kvm.py
@@ -314,8 +314,7 @@ class TestSriovKvm(TestCase):
             if driver == 'igb_uio':
                 # start testpmd with the two VFs on the host
                 self.host_testpmd = PmdOutput(self.dut)
-                eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0': self.sriov_vfs_port[0].pci,
-                                                       'vf1': self.sriov_vfs_port[1].pci}
+                eal_param = '-w %s ' % self.dut.ports_info[0]['pci']
                 self.host_testpmd.start_testpmd(
                     "1S/2C/2T", "--rxq=4 --txq=4", eal_param=eal_param)
                 self.host_testpmd.execute_cmd('set fwd rxonly') @@ -638,7 +637,7 @@ class TestSriovKvm(TestCase):
         # verify vm1 receive packets
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
 
-        self.verify(vm1_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['TX-packets'] == packet_num,
+        self.verify(vm1_ret_stats['RX-packets'] >= packet_num and 
+ vm1_ret_stats['TX-packets'] >= packet_num,
                     "Uplink mirror failed between VM0 and VM1!")
 
     def test_two_vms_downlink_mirror(self):
@@ -809,7 +808,7 @@ class TestSriovKvm(TestCase):
         self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on')
         self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on')
 
-        if self.nic.startswith('niantic'):
+        if self.nic.startswith('niantic') or self.nic.startswith('sage'):
             self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on')
 
             # get vm port stats
@@ -857,7 +856,7 @@ class TestSriovKvm(TestCase):
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
 
         try:
-            if self.nic.startswith('niantic'):
+            if self.nic.startswith('niantic') or self.nic.startswith('sage'):
                 self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num,
                             "vlan mirror failed between VM0 and VM1")
             else:
@@ -886,8 +885,8 @@ class TestSriovKvm(TestCase):
         # verify vm1 receive packets
         vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats)
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
-        self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm0_ret_stats['TX-packets'] == packet_num and
-                    vm1_ret_stats['RX-packets'] == packet_num, "uplink mirror failed between VM0 and VM1")
+        self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num,
+                    "uplink mirror failed between VM0 and VM1")
 
     def test_two_vms_add_multi_exact_mac_on_vf(self):
         port_id_0 = 0
--
2.17.0


[-- Attachment #2: TestSriovKvm.log --]
[-- Type: application/octet-stream, Size: 193890 bytes --]

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

* [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility
@ 2019-10-29 13:57 Xiaoxiao Zeng
  2019-10-29  2:00 ` Zhang, YanX A
  2019-11-05  2:00 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xiaoxiao Zeng @ 2019-10-29 13:57 UTC (permalink / raw)
  To: dts; +Cc: Xiaoxiao Zeng

*.change -b to -w.
*.modify verify to suit more scenes.

Signed-off-by: Xiaoxiao Zeng <xiaoxiaox.zeng@intel.com>
---
 tests/TestSuite_sriov_kvm.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py
index 51fdf68..546b01c 100644
--- a/tests/TestSuite_sriov_kvm.py
+++ b/tests/TestSuite_sriov_kvm.py
@@ -314,8 +314,7 @@ class TestSriovKvm(TestCase):
             if driver == 'igb_uio':
                 # start testpmd with the two VFs on the host
                 self.host_testpmd = PmdOutput(self.dut)
-                eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0': self.sriov_vfs_port[0].pci,
-                                                       'vf1': self.sriov_vfs_port[1].pci}
+                eal_param = '-w %s ' % self.dut.ports_info[0]['pci']
                 self.host_testpmd.start_testpmd(
                     "1S/2C/2T", "--rxq=4 --txq=4", eal_param=eal_param)
                 self.host_testpmd.execute_cmd('set fwd rxonly')
@@ -638,7 +637,7 @@ class TestSriovKvm(TestCase):
         # verify vm1 receive packets
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
 
-        self.verify(vm1_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['TX-packets'] == packet_num,
+        self.verify(vm1_ret_stats['RX-packets'] >= packet_num and vm1_ret_stats['TX-packets'] >= packet_num,
                     "Uplink mirror failed between VM0 and VM1!")
 
     def test_two_vms_downlink_mirror(self):
@@ -809,7 +808,7 @@ class TestSriovKvm(TestCase):
         self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on')
         self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on')
 
-        if self.nic.startswith('niantic'):
+        if self.nic.startswith('niantic') or self.nic.startswith('sage'):
             self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on')
 
             # get vm port stats
@@ -857,7 +856,7 @@ class TestSriovKvm(TestCase):
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
 
         try:
-            if self.nic.startswith('niantic'):
+            if self.nic.startswith('niantic') or self.nic.startswith('sage'):
                 self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num,
                             "vlan mirror failed between VM0 and VM1")
             else:
@@ -886,8 +885,8 @@ class TestSriovKvm(TestCase):
         # verify vm1 receive packets
         vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats)
         vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
-        self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm0_ret_stats['TX-packets'] == packet_num and
-                    vm1_ret_stats['RX-packets'] == packet_num, "uplink mirror failed between VM0 and VM1")
+        self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num,
+                    "uplink mirror failed between VM0 and VM1")
 
     def test_two_vms_add_multi_exact_mac_on_vf(self):
         port_id_0 = 0
-- 
2.17.0


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

* Re: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility
  2019-10-29 13:57 [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility Xiaoxiao Zeng
  2019-10-29  2:00 ` Zhang, YanX A
@ 2019-11-05  2:00 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-11-05  2:00 UTC (permalink / raw)
  To: Zeng, XiaoxiaoX, dts; +Cc: Zeng, XiaoxiaoX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiaoxiao Zeng
> Sent: Tuesday, October 29, 2019 9:58 PM
> To: dts@dpdk.org
> Cc: Zeng, XiaoxiaoX <xiaoxiaox.zeng@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase
> compatibility
> 
> *.change -b to -w.
> *.modify verify to suit more scenes.
> 
> Signed-off-by: Xiaoxiao Zeng <xiaoxiaox.zeng@intel.com>
> ---
>  tests/TestSuite_sriov_kvm.py | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py
> index 51fdf68..546b01c 100644
> --- a/tests/TestSuite_sriov_kvm.py
> +++ b/tests/TestSuite_sriov_kvm.py
> @@ -314,8 +314,7 @@ class TestSriovKvm(TestCase):
>              if driver == 'igb_uio':
>                  # start testpmd with the two VFs on the host
>                  self.host_testpmd = PmdOutput(self.dut)
> -                eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0':
> self.sriov_vfs_port[0].pci,
> -                                                       'vf1': self.sriov_vfs_port[1].pci}
> +                eal_param = '-w %s ' % self.dut.ports_info[0]['pci']
>                  self.host_testpmd.start_testpmd(
>                      "1S/2C/2T", "--rxq=4 --txq=4", eal_param=eal_param)
>                  self.host_testpmd.execute_cmd('set fwd rxonly') @@ -638,7 +637,7
> @@ class TestSriovKvm(TestCase):
>          # verify vm1 receive packets
>          vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
> 
> -        self.verify(vm1_ret_stats['RX-packets'] == packet_num and
> vm1_ret_stats['TX-packets'] == packet_num,
> +        self.verify(vm1_ret_stats['RX-packets'] >= packet_num and
> + vm1_ret_stats['TX-packets'] >= packet_num,
>                      "Uplink mirror failed between VM0 and VM1!")
> 
>      def test_two_vms_downlink_mirror(self):
> @@ -809,7 +808,7 @@ class TestSriovKvm(TestCase):
>          self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on')
>          self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on')
> 
> -        if self.nic.startswith('niantic'):
> +        if self.nic.startswith('niantic') or self.nic.startswith('sage'):
>              self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on')
> 
>              # get vm port stats
> @@ -857,7 +856,7 @@ class TestSriovKvm(TestCase):
>          vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
> 
>          try:
> -            if self.nic.startswith('niantic'):
> +            if self.nic.startswith('niantic') or self.nic.startswith('sage'):
>                  self.verify(vm0_ret_stats['RX-packets'] == packet_num and
> vm1_ret_stats['RX-packets'] == packet_num,
>                              "vlan mirror failed between VM0 and VM1")
>              else:
> @@ -886,8 +885,8 @@ class TestSriovKvm(TestCase):
>          # verify vm1 receive packets
>          vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats)
>          vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats)
> -        self.verify(vm0_ret_stats['RX-packets'] == packet_num and
> vm0_ret_stats['TX-packets'] == packet_num and
> -                    vm1_ret_stats['RX-packets'] == packet_num, "uplink mirror failed
> between VM0 and VM1")
> +        self.verify(vm0_ret_stats['RX-packets'] == packet_num and
> vm1_ret_stats['RX-packets'] == packet_num,
> +                    "uplink mirror failed between VM0 and VM1")
> 
>      def test_two_vms_add_multi_exact_mac_on_vf(self):
>          port_id_0 = 0
> --
> 2.17.0


^ 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-10-29 13:57 [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility Xiaoxiao Zeng
2019-10-29  2:00 ` Zhang, YanX A
2019-11-05  2:00 ` 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