test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1] tests/runtime_vf_queue_number: add case
  2019-10-29 11:53 [dts] [PATCH V1] tests/runtime_vf_queue_number: add case Jianwei Mei
@ 2019-10-29  5:31 ` Zhang, YanX A
  2019-11-04  3:23 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, YanX A @ 2019-10-29  5:31 UTC (permalink / raw)
  To: Mei, JianweiX, dts; +Cc: Mei, JianweiX

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

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

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei
Sent: Tuesday, October 29, 2019 7:54 PM
To: dts@dpdk.org
Cc: Mei, JianweiX <jianweix.mei@intel.com>
Subject: [dts] [PATCH V1] tests/runtime_vf_queue_number: add case

add case,bug fixed on dpdk19.08 for set invalid VF queue number with testpmd function command.

Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
 tests/TestSuite_runtime_vf_queue_number.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_runtime_vf_queue_number.py b/tests/TestSuite_runtime_vf_queue_number.py
index 227d815..940e36a 100644
--- a/tests/TestSuite_runtime_vf_queue_number.py
+++ b/tests/TestSuite_runtime_vf_queue_number.py
@@ -341,8 +341,21 @@ class TestRuntimeVfQn(TestCase):
         Test case 6: set invalid VF queue number with testpmd function command
         :return:
         """
-        # There is a bug of this test case, so the function hasn't been implemented.
-        pass
+        expect_str = ["Warning: Either rx or tx queues should be non zero",
+                      "Fail: input rxq (17) can't be greater than max_rx_queues (16) of port 0",
+                      "Fail: input txq (17) can't be greater than max_tx_queues (16) of port 0"]
+        host_eal_param = '-w %s --file-prefix=test1 --socket-mem 1024,1024' % self.pf_pci
+        self.host_testpmd.start_testpmd(self.pmdout.default_cores, param='', eal_param=host_eal_param)
+        gest_eal_param = '-w %s --file-prefix=test2' % self.vm_dut_0.ports_info[0]['pci']
+        self.vm0_testpmd = PmdOutput(self.vm_dut_0)
+        self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, eal_param=gest_eal_param, param='')
+        for invalid_qn in [0, 17]:
+            self.vm0_testpmd.execute_cmd('port stop all')
+            rxq_output = self.vm0_testpmd.execute_cmd('port config all rxq %d' % invalid_qn)
+            txq_output = self.vm0_testpmd.execute_cmd('port config all txq %d' % invalid_qn)
+            self.verify(rxq_output or txq_output in expect_str, "The output is not expect.")
+            self.vm0_testpmd.execute_cmd('port start all')
+        self.vm0_testpmd.execute_cmd('quit', '# ')
 
     def test_reserve_vf_qn(self):
         """
-- 
1.8.3.1


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

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

* [dts] [PATCH V1] tests/runtime_vf_queue_number: add case
@ 2019-10-29 11:53 Jianwei Mei
  2019-10-29  5:31 ` Zhang, YanX A
  2019-11-04  3:23 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Jianwei Mei @ 2019-10-29 11:53 UTC (permalink / raw)
  To: dts; +Cc: Jianwei Mei

add case,bug fixed on dpdk19.08 for set invalid VF queue number with testpmd function command.

Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
 tests/TestSuite_runtime_vf_queue_number.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_runtime_vf_queue_number.py b/tests/TestSuite_runtime_vf_queue_number.py
index 227d815..940e36a 100644
--- a/tests/TestSuite_runtime_vf_queue_number.py
+++ b/tests/TestSuite_runtime_vf_queue_number.py
@@ -341,8 +341,21 @@ class TestRuntimeVfQn(TestCase):
         Test case 6: set invalid VF queue number with testpmd function command
         :return:
         """
-        # There is a bug of this test case, so the function hasn't been implemented.
-        pass
+        expect_str = ["Warning: Either rx or tx queues should be non zero",
+                      "Fail: input rxq (17) can't be greater than max_rx_queues (16) of port 0",
+                      "Fail: input txq (17) can't be greater than max_tx_queues (16) of port 0"]
+        host_eal_param = '-w %s --file-prefix=test1 --socket-mem 1024,1024' % self.pf_pci
+        self.host_testpmd.start_testpmd(self.pmdout.default_cores, param='', eal_param=host_eal_param)
+        gest_eal_param = '-w %s --file-prefix=test2' % self.vm_dut_0.ports_info[0]['pci']
+        self.vm0_testpmd = PmdOutput(self.vm_dut_0)
+        self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, eal_param=gest_eal_param, param='')
+        for invalid_qn in [0, 17]:
+            self.vm0_testpmd.execute_cmd('port stop all')
+            rxq_output = self.vm0_testpmd.execute_cmd('port config all rxq %d' % invalid_qn)
+            txq_output = self.vm0_testpmd.execute_cmd('port config all txq %d' % invalid_qn)
+            self.verify(rxq_output or txq_output in expect_str, "The output is not expect.")
+            self.vm0_testpmd.execute_cmd('port start all')
+        self.vm0_testpmd.execute_cmd('quit', '# ')
 
     def test_reserve_vf_qn(self):
         """
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1] tests/runtime_vf_queue_number: add case
  2019-10-29 11:53 [dts] [PATCH V1] tests/runtime_vf_queue_number: add case Jianwei Mei
  2019-10-29  5:31 ` Zhang, YanX A
@ 2019-11-04  3:23 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-11-04  3:23 UTC (permalink / raw)
  To: Mei, JianweiX, dts; +Cc: Mei, JianweiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei
> Sent: Tuesday, October 29, 2019 7:54 PM
> To: dts@dpdk.org
> Cc: Mei, JianweiX <jianweix.mei@intel.com>
> Subject: [dts] [PATCH V1] tests/runtime_vf_queue_number: add case
> 
> add case,bug fixed on dpdk19.08 for set invalid VF queue number with
> testpmd function command.
> 
> Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
> ---
>  tests/TestSuite_runtime_vf_queue_number.py | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_runtime_vf_queue_number.py
> b/tests/TestSuite_runtime_vf_queue_number.py
> index 227d815..940e36a 100644
> --- a/tests/TestSuite_runtime_vf_queue_number.py
> +++ b/tests/TestSuite_runtime_vf_queue_number.py
> @@ -341,8 +341,21 @@ class TestRuntimeVfQn(TestCase):
>          Test case 6: set invalid VF queue number with testpmd function
> command
>          :return:
>          """
> -        # There is a bug of this test case, so the function hasn't been
> implemented.
> -        pass
> +        expect_str = ["Warning: Either rx or tx queues should be non zero",
> +                      "Fail: input rxq (17) can't be greater than max_rx_queues (16)
> of port 0",
> +                      "Fail: input txq (17) can't be greater than max_tx_queues (16) of
> port 0"]
> +        host_eal_param = '-w %s --file-prefix=test1 --socket-mem 1024,1024' %
> self.pf_pci
> +        self.host_testpmd.start_testpmd(self.pmdout.default_cores, param='',
> eal_param=host_eal_param)
> +        gest_eal_param = '-w %s --file-prefix=test2' %
> self.vm_dut_0.ports_info[0]['pci']
> +        self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> +        self.vm0_testpmd.start_testpmd(self.pmdout.default_cores,
> eal_param=gest_eal_param, param='')
> +        for invalid_qn in [0, 17]:
> +            self.vm0_testpmd.execute_cmd('port stop all')
> +            rxq_output = self.vm0_testpmd.execute_cmd('port config all rxq %d' %
> invalid_qn)
> +            txq_output = self.vm0_testpmd.execute_cmd('port config all txq %d' %
> invalid_qn)
> +            self.verify(rxq_output or txq_output in expect_str, "The output is not
> expect.")
> +            self.vm0_testpmd.execute_cmd('port start all')
> +        self.vm0_testpmd.execute_cmd('quit', '# ')
> 
>      def test_reserve_vf_qn(self):
>          """
> --
> 1.8.3.1


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

end of thread, other threads:[~2019-11-04  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 11:53 [dts] [PATCH V1] tests/runtime_vf_queue_number: add case Jianwei Mei
2019-10-29  5:31 ` Zhang, YanX A
2019-11-04  3:23 ` 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).