From: Yu Jiang <yux.jiang@intel.com>
To: ke1.xu@intel.com, dts@dpdk.org
Cc: Yu Jiang <yux.jiang@intel.com>
Subject: [dts][PATCH V1 2/2] tests/ice_dcf_switch_filter: sync test_negative_case with testplan
Date: Wed, 12 Apr 2023 18:42:10 +0800 [thread overview]
Message-ID: <20230412104210.1345558-2-yux.jiang@intel.com> (raw)
In-Reply-To: <20230412104210.1345558-1-yux.jiang@intel.com>
1, sync test_negative_case with testplan, add two subcases:
Subcase 4: can not create to vf rule to self dcf
Subcase 17: deprecated action
2, format.sh script
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_ice_dcf_switch_filter.py | 26 ++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_ice_dcf_switch_filter.py b/tests/TestSuite_ice_dcf_switch_filter.py
index 0731199a..f9e5cbf3 100644
--- a/tests/TestSuite_ice_dcf_switch_filter.py
+++ b/tests/TestSuite_ice_dcf_switch_filter.py
@@ -2107,7 +2107,7 @@ tv_mac_ipv4_vxlan_ipv4_udp_pay = {
],
"matched": {
"scapy_str": [
- 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23) /Raw("x"*80)',
+ 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23) /Raw("x"*80)'
],
"check_func": {
"func": rfc.check_vf_rx_packets_number,
@@ -2136,7 +2136,7 @@ tv_mac_ipv4_vxlan_ipv4_tcp = {
],
"matched": {
"scapy_str": [
- 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)',
+ 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)'
],
"check_func": {
"func": rfc.check_vf_rx_packets_number,
@@ -2233,7 +2233,7 @@ tv_mac_ipv4_vxlan_mac_ipv4_udp_pay = {
],
"matched": {
"scapy_str": [
- 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)',
+ 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)'
],
"check_func": {
"func": rfc.check_vf_rx_packets_number,
@@ -2262,7 +2262,7 @@ tv_mac_ipv4_vxlan_mac_ipv4_tcp = {
],
"matched": {
"scapy_str": [
- 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)',
+ 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)'
],
"check_func": {
"func": rfc.check_vf_rx_packets_number,
@@ -2819,6 +2819,7 @@ class ICEDCFSwitchFilterTest(TestCase):
"cannot create to vf rule on a representor": "flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
"cannot create to vf rule on a vf": "flow create 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
"cannot create to vf rule to a vf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 3 / end",
+ "cannot create to vf rule to self dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 0 / end",
"cannot create to vf rule to another dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 4 / end",
"cannot create to vf rule to a representor of another pf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 5 / end",
"cannot create vf original rule on a representor": "flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end",
@@ -2828,6 +2829,7 @@ class ICEDCFSwitchFilterTest(TestCase):
"cannot create vf original rule to another dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 4 / end",
"unsupported input set": "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 tos is 4 / end actions port_representor port_id 1 / end",
"invalid port id": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 20 / end",
+ "deprecated action": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions vf id 1 / end",
"void action": "flow create 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end",
"void input set value": "flow create 0 ingress pattern eth / ipv4 / end actions represented_port ethdev_port_id 1 end",
}
@@ -2861,6 +2863,16 @@ class ICEDCFSwitchFilterTest(TestCase):
)
self.check_switch_filter_rule_list(0, [])
+ self.logger.info("Subcase 4: can not create to vf rule to self dcf")
+ self.validate_switch_filter_rule(
+ rules["cannot create to vf rule to self dcf"], check_stats=False
+ )
+ self.check_switch_filter_rule_list(0, [])
+ self.create_switch_filter_rule(
+ rules["cannot create to vf rule to self dcf"], check_stats=False
+ )
+ self.check_switch_filter_rule_list(0, [])
+
# cannot create to vf rule to another dcf
self.validate_switch_filter_rule(
rules["cannot create to vf rule to another dcf"], check_stats=False
@@ -2923,6 +2935,12 @@ class ICEDCFSwitchFilterTest(TestCase):
)
self.check_switch_filter_rule_list(0, [])
+ self.logger.info("Subcase 17: deprecated action")
+ self.validate_switch_filter_rule(rules["deprecated action"], check_stats=False)
+ self.check_switch_filter_rule_list(0, [])
+ self.create_switch_filter_rule(rules["deprecated action"], check_stats=False)
+ self.check_switch_filter_rule_list(0, [])
+
# unsupported input set
self.validate_switch_filter_rule(
rules["unsupported input set"], check_stats=False
--
2.25.1
prev parent reply other threads:[~2023-04-12 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 10:42 [dts][PATCH V1 1/2] test_plans/ice_dcf_switch_filter: update test plan to support represented port action from deprecated vf action Yu Jiang
2023-04-12 10:42 ` Yu Jiang [this message]
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=20230412104210.1345558-2-yux.jiang@intel.com \
--to=yux.jiang@intel.com \
--cc=dts@dpdk.org \
--cc=ke1.xu@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).