From: Jiale Song <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Jiale Song <songx.jiale@intel.com>
Subject: [dts] [PATCH V1 2/2] tests/cvl_dcf_flow_priority: modify the script according to the testplan
Date: Mon, 6 Sep 2021 16:13:51 +0800 [thread overview]
Message-ID: <1630916031-119082-2-git-send-email-songx.jiale@intel.com> (raw)
In-Reply-To: <1630916031-119082-1-git-send-email-songx.jiale@intel.com>
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_cvl_dcf_flow_priority.py | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/tests/TestSuite_cvl_dcf_flow_priority.py b/tests/TestSuite_cvl_dcf_flow_priority.py
index 07d99d2..d78a1ae 100644
--- a/tests/TestSuite_cvl_dcf_flow_priority.py
+++ b/tests/TestSuite_cvl_dcf_flow_priority.py
@@ -1320,6 +1320,7 @@ class CVLDCFFlowPriorityTest(TestCase):
rule1=rte_flow_pattern[0:14] + "priority 0" + rte_flow_pattern[13:length]
rule2=rte_flow_pattern[0:14] + "priority 1" + rte_flow_pattern[13:length-7]+ "2" + rte_flow_pattern[length-6:length]
rte_flow=[rule1, rule2]
+
#validate 2 rule
self.validate_switch_filter_rule(rte_flow)
#create 2 rule
@@ -1327,31 +1328,34 @@ class CVLDCFFlowPriorityTest(TestCase):
self.check_switch_filter_rule_list(0, rule_list)
#send matched packets and check
matched_dic = test_vector["matched"]
- matched_dic["check_func"]["param"]["expect_port"]=2
self.send_and_check_packets(matched_dic)
#send mismatched packets and check
mismatched_dic = test_vector["mismatched"]
mismatched_dic["check_func"]["param"]["expect_port"]=[1,2]
mismatched_dic["expect_results"]["expect_pkts"]=[0,0]
self.send_and_check_packets(mismatched_dic)
- #destroy rule with priority 1
- self.destroy_switch_filter_rule(0, rule_list[1])
- self.check_switch_filter_rule_list(0, ['0'])
- #send matched packets and check
- destroy_dict1 = copy.deepcopy(matched_dic)
- destroy_dict1["check_func"]["param"]["expect_port"]=1
- self.send_and_check_packets(destroy_dict1)
- #recreate rule with priority 1
- self.create_switch_filter_rule(rte_flow[1])
- self.check_switch_filter_rule_list(0, rule_list)
+
#destroy rule with priority 0
self.destroy_switch_filter_rule(0, rule_list[0])
+ rule_list.remove('0')
self.check_switch_filter_rule_list(0, ['1'])
#send matched packets and check
+ destroy_dict1 = copy.deepcopy(matched_dic)
+ destroy_dict1["check_func"]["param"]["expect_port"]=2
+ self.send_and_check_packets(destroy_dict1)
+
+ #recreate rule with priority 0 (rule 2)
+ self.create_switch_filter_rule(rte_flow[0])
+ rule_list.insert(0, '2')
+ #destroy rule with priority 1
+ self.destroy_switch_filter_rule(0, rule_list[1])
+ self.check_switch_filter_rule_list(0, ['2'])
+ #send matched packets and check
destroy_dict2 = copy.deepcopy(matched_dic)
self.send_and_check_packets(destroy_dict2)
- #destroy rule with priority 1 and check
- self.destroy_switch_filter_rule(0, rule_list[1])
+
+ #destroy rule with priority 0 and check
+ self.destroy_switch_filter_rule(0, rule_list[0])
self.check_switch_filter_rule_list(0, [])
destroy_dict3 = copy.deepcopy(matched_dic)
if isinstance(destroy_dict3["expect_results"]["expect_pkts"], list):
--
1.8.3.1
next prev parent reply other threads:[~2021-09-06 8:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 8:13 [dts] [PATCH V1 1/2] test_plans/cvl_dcf_flow_priority: modify rule priority Jiale Song
2021-09-06 8:13 ` Jiale Song [this message]
2021-09-13 7:47 Jiale Song
2021-09-13 7:47 ` [dts] [PATCH V1 2/2] tests/cvl_dcf_flow_priority: modify the script according to the testplan Jiale Song
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=1630916031-119082-2-git-send-email-songx.jiale@intel.com \
--to=songx.jiale@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).