From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D570CA0032; Mon, 11 Jul 2022 08:55:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A71CA4021F; Mon, 11 Jul 2022 08:55:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 0655D4021E for ; Mon, 11 Jul 2022 08:55:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657522542; x=1689058542; h=from:to:cc:subject:date:message-id; bh=eaNGvgMvxDh5aLdjl9/GnI2UyW3e8MTcJjkrGhMathM=; b=IqjDXnSSfae4enO59sM7Ehd1uPz+SL17Nc06wH04VaMe/NBAzJaiZLKx SKskjYmTKty9mjIg3rPTj0PAjmhCQi/KCyABWcGi6rE4dBqoTpT+nozJ4 IC8mSRwcgwDFi+I1Z436YM2CX2SspQNkm3nXleIyXPAp/YbTv6MPc+HQt YYm7PRwXICCHcNEO3fdfM0uuWoFsIXYiH+kIUJJ8V6eia/osxm0aXUMYQ OTyQ5iibpA5JcgfSrfiIphw7Zy3ntoCVWFd4rxiD1UC7+sZsjYsCH5Vzq TsV1CHRR0JyVOj/CDovF9LjJPTuJPSGEEEFhhkT9SUqWzgJl08gUhq7Eo A==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="264366488" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="264366488" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2022 23:55:40 -0700 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="592157617" Received: from unknown (HELO localhost.localdomain) ([10.239.252.93]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2022 23:55:39 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V1] tests/ice_advanced_rss_pppoe:add destroy test param Date: Mon, 11 Jul 2022 23:17:48 +0800 Message-Id: <20220711151748.3155-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 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 --- tests/TestSuite_ice_advanced_rss_pppoe.py | 32 ++++++++++++++--------- 1 file changed, 20 insertions(+), 12 deletions(-) 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 + ) -- 2.17.1