diff mbox series

[V1] tests/ice_advanced_rss_pppoe:add destroy test param

Message ID 20220711151748.3155-1-zhiminx.huang@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/ice_advanced_rss_pppoe:add destroy test param | expand

Checks

Context Check Description
ci/Intel-dts-suite-test fail Testing issues
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK

Commit Message

Huang, ZhiminX July 11, 2022, 3:17 p.m. UTC
fix dts 21b47e97d7e(add check result after deleting the rules).
some case no need to check hash values after destroy rule.
so add param judgement to check destroy rule test flow.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/TestSuite_ice_advanced_rss_pppoe.py | 32 ++++++++++++++---------
 1 file changed, 20 insertions(+), 12 deletions(-)

Comments

Song Jiale July 18, 2022, 3:32 a.m. UTC | #1
> -----Original Message-----
> From: Zhimin Huang <zhiminx.huang@intel.com>
> Sent: Monday, July 11, 2022 11:18 PM
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts][PATCH V1] tests/ice_advanced_rss_pppoe:add destroy test param
> 
> fix dts 21b47e97d7e(add check result after deleting the rules).
> some case no need to check hash values after destroy rule.
> so add param judgement to check destroy rule test flow.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
> ---
Tested-by: Jiale Song < songx.jiale@intel.com>
Tu, Lijuan Oct. 9, 2022, 10:07 a.m. UTC | #2
On Mon, 11 Jul 2022 23:17:48 +0800, Zhimin Huang <zhiminx.huang@intel.com> wrote:
> fix dts 21b47e97d7e(add check result after deleting the rules).
> some case no need to check hash values after destroy rule.
> so add param judgement to check destroy rule test flow.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>


Applied, thanks
diff mbox series

Patch

diff --git a/tests/TestSuite_ice_advanced_rss_pppoe.py b/tests/TestSuite_ice_advanced_rss_pppoe.py
index ebb644f6..78a6a734 100644
--- a/tests/TestSuite_ice_advanced_rss_pppoe.py
+++ b/tests/TestSuite_ice_advanced_rss_pppoe.py
@@ -5153,8 +5153,11 @@  class Advanced_rss_pppoe(TestCase):
             func(out, hash_key)
 
     def _two_rules_operation(
-        self, rule_list, pkt_list, action_list1=None, action_list2=None
+        self, rule_list, pkt_list, action_list1=None, action_list2=None, **kwargs
     ):
+        destroy_test = (
+            kwargs.get("destroy_test") if kwargs.get("destroy_test") else False
+        )
         for i in range(0, len(rule_list)):
             self.rsspro.create_rule(rule_list[i])
             self.rsspro.check_rule(rule_list=["{}".format(i)])
@@ -5163,15 +5166,16 @@  class Advanced_rss_pppoe(TestCase):
                 self._send_pkt_action(pkt_list)
             else:
                 self._send_pkt_action(pkt_list)
-        # destory rule 1
-        self.rsspro.destroy_rule(rule_id=1)
-        self.rsspro.check_rule(rule_list=["1"], stats=False)
-        pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1]
-        self._send_pkt_action(pkt_list)
-        # destory rule 0
-        self.rsspro.destroy_rule(rule_id=0)
-        self.rsspro.check_rule(rule_list=["0"], stats=False)
-        self._send_pkt_action(pkt_list, action_list=["check_no_hash"] * 3)
+        if destroy_test:
+            # destroy rule 1
+            self.rsspro.destroy_rule(rule_id=1)
+            self.rsspro.check_rule(rule_list=["1"], stats=False)
+            pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1]
+            self._send_pkt_action(pkt_list)
+            # destroy rule 0
+            self.rsspro.destroy_rule(rule_id=0)
+            self.rsspro.check_rule(rule_list=["0"], stats=False)
+            self._send_pkt_action(pkt_list, action_list=["check_no_hash"] * 3)
 
     def test_two_rules_smaller_first_larger_later(
         self,
@@ -5190,7 +5194,9 @@  class Advanced_rss_pppoe(TestCase):
             'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)',
             'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)',
         ]
-        self._two_rules_operation(rule_list, pkt_list, action_list2=["check_no_hash"])
+        self._two_rules_operation(
+            rule_list, pkt_list, action_list2=["check_no_hash"], destroy_test=True
+        )
         self.verify(not self.rsspro.error_msgs, "some subcases failed")
 
     def test_two_rules_larger_first_smaller_later(self):
@@ -5208,4 +5214,6 @@  class Advanced_rss_pppoe(TestCase):
             'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)',
             'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)',
         ]
-        self._two_rules_operation(rule_list, pkt_list, action_list2=["check_no_hash"])
+        self._two_rules_operation(
+            rule_list, pkt_list, action_list2=["check_no_hash"], destroy_test=True
+        )