From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1] tests/dcf_lifecycle: add kernel check in test script
Date: Wed, 1 Feb 2023 16:00:14 +0800 [thread overview]
Message-ID: <20230201080014.101798-1-weiyuanx.li@intel.com> (raw)
Some test cases require the kernel 4.19+ in the testplan, but test script does not check the kernel. Which will cause the lower version of kernel to fail when run cases.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/TestSuite_dcf_lifecycle.py | 41 +++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_dcf_lifecycle.py b/tests/TestSuite_dcf_lifecycle.py
index cd7e1824..28ee99f7 100644
--- a/tests/TestSuite_dcf_lifecycle.py
+++ b/tests/TestSuite_dcf_lifecycle.py
@@ -604,6 +604,10 @@ class TestDcfLifeCycle(TestCase):
self.verify(expected_str in dmesg_output, msg)
def verify_support_dcf_mode_03(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
except_content = None
try:
self.vf_set_trust(vf_id=1)
@@ -646,6 +650,10 @@ class TestDcfLifeCycle(TestCase):
self.verify(expected_str in dmesg_output, msg)
def verify_support_dcf_mode_04(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
except_content = None
try:
self.vf_set_trust_off()
@@ -1089,7 +1097,10 @@ class TestDcfLifeCycle(TestCase):
"""
Run before each test case.
"""
- pass
+ # get os kernel version
+ self.os_kernel_version = ".".join(
+ self.dut.send_expect("uname -r", "# ").split(".")[0:2]
+ )
def tear_down(self):
"""
@@ -1182,6 +1193,10 @@ class TestDcfLifeCycle(TestCase):
"""
When ADQ set on PF, PF should reject the DCF mode
"""
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : When ADQ set on PF, PF should reject the DCF mode"
self.logger.info(msg)
self.verify_dcf_with_adq_01()
@@ -1190,6 +1205,10 @@ class TestDcfLifeCycle(TestCase):
"""
When DCF mode enabled, ADQ setting on PF shall fail
"""
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : When DCF mode enabled, ADQ setting on PF shall fail"
self.logger.info(msg)
self.verify_dcf_with_adq_02()
@@ -1215,6 +1234,10 @@ class TestDcfLifeCycle(TestCase):
"""
When DCF mode enabled, PF can't set L2 forwarding
"""
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : When DCF mode enabled, PF can't set L2 forwarding"
self.logger.info(msg)
self.verify_dcf_with_l2fwd_02()
@@ -1513,6 +1536,10 @@ class TestDcfLifeCycle(TestCase):
self.run_test_post()
def test_dcf_with_acl_filter_01(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : add ACL rule by kernel, reject request for DCF functionality"
self.logger.info(msg)
self.vf_set_trust()
@@ -1555,6 +1582,10 @@ class TestDcfLifeCycle(TestCase):
self.d_con(["quit", "# ", 15])
def test_dcf_with_acl_filter_02(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : add ACL rule by kernel, accept request for DCF functionality of another PF"
self.logger.info(msg)
self.vf_set_trust()
@@ -1568,6 +1599,10 @@ class TestDcfLifeCycle(TestCase):
self.d_con(["quit", "# ", 15])
def test_dcf_with_acl_filter_03(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : ACL DCF mode is active, add ACL filters by way of host based configuration is rejected"
self.logger.info(msg)
self.vf_set_trust()
@@ -1579,6 +1614,10 @@ class TestDcfLifeCycle(TestCase):
self.delete_acl_rule_by_kernel_cmd()
def test_dcf_with_acl_filter_04(self):
+ self.skip_case(
+ self.os_kernel_version > "4.19",
+ "Host kernel version is required 4.19+",
+ )
msg = "begin : ACL DCF mode is active, add ACL filters by way of host based configuration on another PF successfully"
self.logger.info(msg)
self.vf_set_trust()
--
2.25.1
next reply other threads:[~2023-02-01 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 8:00 Weiyuan Li [this message]
2023-03-03 17:17 [dts][PATCH V1] tests/dcf_lifecycle:add " Hongbo Li
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=20230201080014.101798-1-weiyuanx.li@intel.com \
--to=weiyuanx.li@intel.com \
--cc=dts@dpdk.org \
/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).