From patchwork Fri Feb 24 16:51:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 124505 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2629E41D5D; Fri, 24 Feb 2023 09:34:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 004F940697; Fri, 24 Feb 2023 09:34:45 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id DEDCD40693 for ; Fri, 24 Feb 2023 09:34:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677227684; x=1708763684; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Sc7VBbdhiV8hBSBkDkjSC3MsAd3zsCXNoaSZMksynxU=; b=Xzq0GPEshHNEWmdCAU25uyC0FaU36kvI81f79tUbjNvCRs9dJ19VNWpD kJaJvB4JUEAELiwJqup3n7OmP2b9GLjSk2qmvuPtycURtzbikOm6V5dAF G0hebOnF5n4n2da+hOUQ+dbNuXOUMI/QzNO7zSB5NYJY72Lqh0X3mFvzb M7t3mvaJaTzOP75t2eJm5jJlMMbcmBg1KPwFRk4NmpXqZqcssQSuwPa+5 TXj7Iv4OeJlA4uUxOonDmgKQzfAm0pI8MnFjj+8hzAZAo0JC0vicogL+M tpMDs7rHRiYeZj+8tjbafG5aZ1xCvjmwTONwfga/gsOcXzRr7UWcCylxn A==; X-IronPort-AV: E=McAfee;i="6500,9779,10630"; a="332112901" X-IronPort-AV: E=Sophos;i="5.97,324,1669104000"; d="scan'208";a="332112901" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2023 00:34:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10630"; a="761716227" X-IronPort-AV: E=Sophos;i="5.97,324,1669104000"; d="scan'208";a="761716227" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2023 00:34:21 -0800 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/iavf_rss_protocol_agnostic_flow: optimize script Date: Fri, 24 Feb 2023 16:51:50 +0000 Message-Id: <20230224165150.1437970-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 the correct error information is not obtained.the error message comes from "rte_flow_common.RssProcessing.error_msgs"."self.error_msgs" does not get the corresponding error message. Signed-off-by: Jiale Song --- tests/TestSuite_iavf_rss_protocol_agnostic_flow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_iavf_rss_protocol_agnostic_flow.py b/tests/TestSuite_iavf_rss_protocol_agnostic_flow.py index 1a6fb2c3..e8d8d58f 100644 --- a/tests/TestSuite_iavf_rss_protocol_agnostic_flow.py +++ b/tests/TestSuite_iavf_rss_protocol_agnostic_flow.py @@ -484,7 +484,6 @@ class TestIavfRssProtocolAgnosticFlow(TestCase): def handle_rss_case(self, case_info): # clear hash_records before each sub case self.hash_records = {} - self.error_msgs = [] self.current_saved_hash = "" sub_case_name = case_info.get("sub_casename") self.logger.info( @@ -516,10 +515,12 @@ class TestIavfRssProtocolAgnosticFlow(TestCase): self.rsspro.destroy_rule(port_id=port_id, rule_id=rule_ids) self.rsspro.check_rule(port_id=port_id, stats=False) self.rsspro.handle_tests(case_info["post-test"], port_id=port_id) - if self.error_msgs: + if self.rsspro.error_msgs: self.verify( False, - " ".join([errs.replace("'", " ") for errs in self.error_msgs[:500]]), + " ".join( + [errs.replace("'", " ") for errs in self.rsspro.error_msgs[:500]] + ), ) def rte_flow(self, case_list, func_name, **kwargs): @@ -643,7 +644,6 @@ class TestIavfRssProtocolAgnosticFlow(TestCase): # create rule self.rsspro.create_rule(rules, check_stats=True) self.rsspro.error_msgs = [] - self.rsspro.error_msgs = [] self.handle_tests(tests, port_id=dPort, tport_id=tPort) if self.rsspro.error_msgs: self.verify(