diff mbox series

[V1] tests/generic_flow_api: put validate rule after create rule

Message ID 20210330081828.18432-1-yanx.xia@intel.com (mailing list archive)
State Superseded
Headers show
Series [V1] tests/generic_flow_api: put validate rule after create rule | expand

Commit Message

Yan Xia March 30, 2021, 8:18 a.m. UTC
it's not work if execute validate rule before execute create rule, so put validate 
after create rule.

Signed-off-by: Xia Yan <yanx.xia@intel.com>
---
 tests/TestSuite_generic_flow_api.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Chen, LingliX March 30, 2021, 8:59 a.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xia Yan
> Sent: Tuesday, March 30, 2021 4:18 PM
> To: dts@dpdk.org
> Cc: Xia, YanX <yanx.xia@intel.com>
> Subject: [dts] [PATCH V1] tests/generic_flow_api: put validate rule after create
> rule

Tested-by: Chen Lingli <linglix.chen@intel.com>
Tu, Lijuan March 31, 2021, 6:02 a.m. UTC | #2
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xia Yan
> Sent: 2021年3月30日 16:18
> To: dts@dpdk.org
> Cc: Xia, YanX <yanx.xia@intel.com>
> Subject: [dts] [PATCH V1] tests/generic_flow_api: put validate rule after create
> rule
> 
> it's not work if execute validate rule before execute create rule, so put validate
> after create rule.
> 
> Signed-off-by: Xia Yan <yanx.xia@intel.com>

Why do this, it violates test plan:

validate the rules first before create it in each case.
All the rules that can be validated correctly should be created successfully.
The rules can't be validated correctly shouldn't be created successfully.
diff mbox series

Patch

diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py
index 6822f8ab..5f9de37c 100644
--- a/tests/TestSuite_generic_flow_api.py
+++ b/tests/TestSuite_generic_flow_api.py
@@ -705,19 +705,19 @@  class TestGeneric_flow_api(TestCase):
         time.sleep(2)
         # create the flow rules
         basic_flow_actions = [
-            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip'], 'actions': ['queue']},
-            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'udp', 'sport', 'dport'],
-             'actions': ['queue']},
-            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'tcp', 'sport', 'dport'],
-             'actions': ['queue']},
-            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'sctp', 'sport', 'dport'],
-             'actions': ['queue']},
             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip'], 'actions': ['queue']},
             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'udp', 'sport', 'dport'],
              'actions': ['queue']},
             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'tcp', 'sport', 'dport'],
              'actions': ['queue']},
             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'sctp', 'sport', 'dport'],
+             'actions': ['queue']},
+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip'], 'actions': ['queue']},
+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'udp', 'sport', 'dport'],
+             'actions': ['queue']},
+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'tcp', 'sport', 'dport'],
+             'actions': ['queue']},
+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'sctp', 'sport', 'dport'],
              'actions': ['queue']}
         ]
         extrapkt_rulenum = self.all_flows_process(basic_flow_actions)