From: Song Jiale <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Song Jiale <songx.jiale@intel.com>, Jin Ling <jin.ling@intel.com>
Subject: [dts] [PATCH V3 2/2] test_plans/multiprocess: add 1 case
Date: Fri, 30 Dec 2022 18:20:28 +0000 [thread overview]
Message-ID: <20221230182028.1004481-2-songx.jiale@intel.com> (raw)
In-Reply-To: <20221230182028.1004481-1-songx.jiale@intel.com>
add a case to test the testpmd secondary process crash of the pf port.
Signed-off-by: Jin Ling <jin.ling@intel.com>
Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
v3:
-redesign 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
next prev parent reply other threads:[~2022-12-30 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 18:20 [dts] [PATCH V3 1/2] tests/multiprocess: add new case according to testplan Song Jiale
2022-12-30 18:20 ` Song Jiale [this message]
2022-12-30 18:28 Song Jiale
2022-12-30 18:28 ` [dts] [PATCH V3 2/2] test_plans/multiprocess: add 1 case Song Jiale
2022-12-30 11:03 ` Ling, Jin
2023-01-04 1:32 ` lijuan.tu
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=20221230182028.1004481-2-songx.jiale@intel.com \
--to=songx.jiale@intel.com \
--cc=dts@dpdk.org \
--cc=jin.ling@intel.com \
/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).