* [dts] [PATCH V1] tests/ice_dcf_acl_filter: remove case test_mutually_exclusive
@ 2022-06-22 17:10 Jiale Song
2022-06-29 1:35 ` lijuan.tu
0 siblings, 1 reply; 2+ messages in thread
From: Jiale Song @ 2022-06-22 17:10 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
test_mutually_exclusive not in the test plan, duplicated by test_dcf_with_acl_filter_01-04 in dcf_lifecycle,
remove it.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_ice_dcf_acl_filter.py | 82 ---------------------------
1 file changed, 82 deletions(-)
diff --git a/tests/TestSuite_ice_dcf_acl_filter.py b/tests/TestSuite_ice_dcf_acl_filter.py
index 5e8b6e24..f22ada88 100644
--- a/tests/TestSuite_ice_dcf_acl_filter.py
+++ b/tests/TestSuite_ice_dcf_acl_filter.py
@@ -1760,93 +1760,11 @@ class ICEDCFACLFilterTest(TestCase):
self.dut.kill_all()
self.testpmd_status = "close"
- def test_mutually_exclusive(self):
- """
- DCF mode and any ACL filters (not added by DCF) shall be mutually exclusive
- """
- self.dut.kill_all()
- self.session_secondary = self.dut.new_session()
-
- # add ACL rule by kernel, reject request for DCF functionality
- self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=True)
- out_testpmd = self.launch_testpmd()
- self.check_dcf_status(out_testpmd, stats=False)
- self.quit_testpmd()
- self.delete_acl_rule_not_added_by_dcf()
- out_testpmd = self.launch_testpmd()
- self.check_dcf_status(out_testpmd, stats=True)
- self.quit_testpmd()
-
- # add ACL rule by kernel, accept request for DCF functionality of another PF
- self.add_acl_rule_not_by_dcf(self.pf1_intf, stats=True)
- out_testpmd = self.launch_testpmd()
- self.check_dcf_status(out_testpmd, stats=True)
- self.quit_testpmd()
- self.delete_acl_rule_not_added_by_dcf()
-
- # ACL DCF mode is active, add ACL filters by way of host based configuration is rejected
- out_testpmd = self.launch_testpmd()
- self.check_dcf_status(out_testpmd, stats=True)
- self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=False)
- self.quit_testpmd()
- self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=True)
- self.delete_acl_rule_not_added_by_dcf()
-
- # ACL DCF mode is active, add ACL filters by way of host based configuration on another PF successfully
- out_testpmd = self.launch_testpmd()
- self.check_dcf_status(out_testpmd, stats=True)
- self.add_acl_rule_not_by_dcf(self.pf1_intf, stats=True)
- self.quit_testpmd()
- self.delete_acl_rule_not_added_by_dcf()
-
- def add_acl_rule_not_by_dcf(self, pf, stats=True):
- """
- use secondary session
- add acl rule by kernel command
- """
- if stats:
- self.session_secondary.send_expect(
- "ethtool -N %s flow-type tcp4 src-ip 192.168.10.0 m 0.255.255.255 dst-port 8000 m 0x00ff action -1"
- % pf,
- "# ",
- )
- else:
- error_info = "rmgr: Cannot insert RX class rule: No such file or directory"
- self.session_secondary.send_expect(
- "ethtool -N %s flow-type tcp4 src-ip 192.168.10.0 m 0.255.255.255 dst-port 8000 m 0x00ff action -1"
- % pf,
- error_info,
- )
-
- def delete_acl_rule_not_added_by_dcf(self):
- """
- delete all the acl rule added not by DCF
- """
- out_pf0 = self.dut.send_expect("ethtool -n %s" % (self.pf0_intf), "# ")
- out_pf1 = self.dut.send_expect("ethtool -n %s" % (self.pf1_intf), "# ")
-
- p = re.compile(r"Filter: (\d+)")
- m0 = p.search(out_pf0)
- m1 = p.search(out_pf1)
- if m0:
- self.dut.send_expect(
- "ethtool -N %s delete %d" % (self.pf0_intf, int(m0.group(1))), "# "
- )
- self.dut.send_expect("ethtool -n %s" % (self.pf0_intf), "Total 0 rules")
- if m1:
- self.dut.send_expect(
- "ethtool -N %s delete %d" % (self.pf1_intf, int(m1.group(1))), "# "
- )
- self.dut.send_expect("ethtool -n %s" % (self.pf1_intf), "Total 0 rules")
-
def tear_down(self):
"""
Run after each test case.
"""
self.quit_testpmd()
- if getattr(self, "session_secondary", None):
- self.dut.close_session(self.session_secondary)
- self.delete_acl_rule_not_added_by_dcf()
def tear_down_all(self):
"""
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-29 1:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 17:10 [dts] [PATCH V1] tests/ice_dcf_acl_filter: remove case test_mutually_exclusive Jiale Song
2022-06-29 1:35 ` 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).