test suite reviews and discussions
 help / color / mirror / Atom feed
* RE: [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case
  2022-12-30 18:40 ` [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case Song Jiale
@ 2022-12-30 11:01   ` Ling, Jin
  2023-01-04  1:33   ` lijuan.tu
  1 sibling, 0 replies; 4+ messages in thread
From: Ling, Jin @ 2022-12-30 11:01 UTC (permalink / raw)
  To: Jiale, SongX, dts; +Cc: Jiale, SongX



> -----Original Message-----
> From: Jiale, SongX <songx.jiale@intel.com>
> Sent: 2022年12月31日 2:41
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>; Ling, Jin <jin.ling@intel.com>
> Subject: [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case
> 
> add a case to test the testpmd primary process and secondary process crash
> of the vf port.
> 
> Signed-off-by: Jin Ling <jin.ling@intel.com>
> Signed-off-by: Song Jiale <songx.jiale@intel.com>
> ---
> 
> v3:
> -redesign testplan
> 
>  test_plans/multiprocess_iavf_test_plan.rst | 47 +++++++++++++++++++++-
>  1 file changed, 46 insertions(+), 1 deletion(-)
> 
Acked-by: Jin Ling<jin.ling@intel.com>

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

* [dts] [PATCH V3 1/2] tests/multiprocess_iavf: add new case according to testplan
@ 2022-12-30 18:40 Song Jiale
  2022-12-30 18:40 ` [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case Song Jiale
  0 siblings, 1 reply; 4+ messages in thread
From: Song Jiale @ 2022-12-30 18:40 UTC (permalink / raw)
  To: dts; +Cc: Song Jiale

1. add 1 case according to testplan.
2. the optimization script, sort the results of regular matching.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---

v3:
-rework the test case according to the new testplan

 tests/TestSuite_multiprocess_iavf.py | 46 +++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_multiprocess_iavf.py b/tests/TestSuite_multiprocess_iavf.py
index bb8e0c98..c52bfa9c 100644
--- a/tests/TestSuite_multiprocess_iavf.py
+++ b/tests/TestSuite_multiprocess_iavf.py
@@ -476,7 +476,7 @@ class TestMultiprocessIavf(TestCase):
         )
         pkt_num = kwargs.get("pkt_num")
         res = self.get_pkt_statistic(out, **kwargs)
-        res_num = res["rx-total"]
+        res_num = res["rx-packets"]
         self.verify(
             res_num == pkt_num,
             "fail: got wrong number of packets, expect pakcet number {}, got {}".format(
@@ -1068,6 +1068,7 @@ class TestMultiprocessIavf(TestCase):
             r"Port \d+\s+-\s+rx:\s+(?P<rx>\d+)\s+tx:.*PORTS", out, re.DOTALL
         )
         rx_num = re.findall(r"Client\s+\d\s+-\s+rx:\s+(\d+)", res.group(0))
+        rx_num.sort(reverse=True)
         for i in range(proc_num):
             self.verify(
                 int(rx_num[i]) > 0,
@@ -1677,6 +1678,49 @@ class TestMultiprocessIavf(TestCase):
         }
         self.rte_flow(mac_ipv4_symmetric, self.multiprocess_rss_data, **pmd_param)
 
+    def test_multiprocess_negative_action(self):
+        """
+        Test Case: test_multiprocess_negative_action
+
+        """
+        # start testpmd multi-process
+        self.launch_multi_testpmd(
+            proc_type="auto",
+            queue_num=4,
+            process_num=2,
+        )
+        for pmd_output in self.pmd_output_list:
+            pmd_output.execute_cmd("stop")
+        # set primary process port stop
+        try:
+            self.pmd_output_list[0].execute_cmd("port stop 0")
+        except Exception as ex:
+            out = ex.output
+            self.logger.error(out)
+            self.verify(
+                "core dump" not in out, "Core dump occurred in the primary process!!!"
+            )
+        for pmd_output in self.pmd_output_list:
+            pmd_output.quit()
+        # start testpmd multi-process
+        self.launch_multi_testpmd(
+            proc_type="auto",
+            queue_num=4,
+            process_num=2,
+        )
+        for pmd_output in self.pmd_output_list:
+            pmd_output.execute_cmd("stop")
+        # reset port in secondary process
+        try:
+            self.pmd_output_list[1].execute_cmd("port stop 0")
+            self.pmd_output_list[1].execute_cmd("port reset 0")
+        except Exception as ex:
+            out = ex.output
+            self.logger.error(out)
+            self.verify(
+                "core dump" not in out, "Core dump occurred in the second process!!!"
+            )
+
     def set_fields(self):
         """set ip protocol field behavior"""
         fields_config = {
-- 
2.25.1


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

* [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case
  2022-12-30 18:40 [dts] [PATCH V3 1/2] tests/multiprocess_iavf: add new case according to testplan Song Jiale
@ 2022-12-30 18:40 ` Song Jiale
  2022-12-30 11:01   ` Ling, Jin
  2023-01-04  1:33   ` lijuan.tu
  0 siblings, 2 replies; 4+ messages in thread
From: Song Jiale @ 2022-12-30 18:40 UTC (permalink / raw)
  To: dts; +Cc: Song Jiale, Jin Ling

add a case to test the testpmd primary process and secondary process crash of the vf port.

Signed-off-by: Jin Ling <jin.ling@intel.com>
Signed-off-by: Song Jiale <songx.jiale@intel.com>
---

v3:
-redesign testplan

 test_plans/multiprocess_iavf_test_plan.rst | 47 +++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/test_plans/multiprocess_iavf_test_plan.rst b/test_plans/multiprocess_iavf_test_plan.rst
index 2f5ae54a..b6222773 100644
--- a/test_plans/multiprocess_iavf_test_plan.rst
+++ b/test_plans/multiprocess_iavf_test_plan.rst
@@ -54,9 +54,11 @@ If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios.When
 using vfio, use the following commands to load the vfio driver and bind it
 to the device under test::
 
+   echo 1 > /sys/bus/pci/devices/0000:17:00.0/sriov_numvfs
+   ip link set ens9 vf0 mac 00:11:22:33:44:55
    modprobe vfio
    modprobe vfio-pci
-   usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id
+   usertools/dpdk-devbind.py --bind=vfio-pci {vf_pci}
 
 Assuming that a DPDK build has been set up and the multi-process sample
 applications have been built.
@@ -948,3 +950,46 @@ Test Case: test_multiprocess_negative_exceed_process_num
     the first and second processes should be launched successfully
     the third process should be launched failed and output should contain the following string:
     'multi-process option proc-id(2) should be less than num-procs(2)'
+
+Test Case: test_multiprocess_negative_action
+============================================
+Subcase 1: test_secondary_process_port_stop
+-------------------------------------------
+test steps
+~~~~~~~~~~
+
+1. Launch the app ``testpmd``, start 2 process with the following arguments::
+
+   ./dpdk-testpmd -l 1,2 --proc-type=auto -a 0000:17:01.0  --log-level=ice,7 -- -i  --num-procs=2 --proc-id=0
+   ./dpdk-testpmd -l 3,4 --proc-type=auto -a 0000:17:01.0  --log-level=ice,7 -- -i  --num-procs=2 --proc-id=1
+
+2. stop port in primary process::
+
+    primary process:
+      testpmd> port stop 0
+
+expected result
+~~~~~~~~~~~~~~~
+
+   Check that there are no core dump messages in the output.
+
+Subcase 2: test_secondary_process_port_reset
+--------------------------------------------
+test steps
+~~~~~~~~~~
+
+1. Launch the app ``testpmd``, start 2 process with the following arguments::
+
+   ./dpdk-testpmd -l 1,2 --proc-type=auto -a 0000:17:01.0  --log-level=ice,7 -- -i  --num-procs=2 --proc-id=0
+   ./dpdk-testpmd -l 3,4 --proc-type=auto -a 0000:17:01.0  --log-level=ice,7 -- -i  --num-procs=2 --proc-id=1
+
+2. reset port in secondary process::
+
+    secondary process:
+      testpmd> port stop 0
+      testpmd> port reset 0
+
+expected result
+~~~~~~~~~~~~~~~
+
+   Check that there are no core dump messages in the output.
\ No newline at end of file
-- 
2.25.1


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

* [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case
  2022-12-30 18:40 ` [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case Song Jiale
  2022-12-30 11:01   ` Ling, Jin
@ 2023-01-04  1:33   ` lijuan.tu
  1 sibling, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2023-01-04  1:33 UTC (permalink / raw)
  To: dts, Song Jiale; +Cc: Song Jiale, Jin Ling

On Fri, 30 Dec 2022 18:40:39 +0000, Song Jiale <songx.jiale@intel.com> wrote:
> add a case to test the testpmd primary process and secondary process crash of the vf port.
> 
> Signed-off-by: Jin Ling <jin.ling@intel.com>
> Signed-off-by: Song Jiale <songx.jiale@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks

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

end of thread, other threads:[~2023-01-04  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 18:40 [dts] [PATCH V3 1/2] tests/multiprocess_iavf: add new case according to testplan Song Jiale
2022-12-30 18:40 ` [dts] [PATCH V3 2/2] test_plans/multiprocess_iavf: add 1 case Song Jiale
2022-12-30 11:01   ` Ling, Jin
2023-01-04  1:33   ` lijuan.tu

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