[V1] tests/iavf_rss_protocol_agnostic_flow: optimize script

Message ID 20230224165150.1437970-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/iavf_rss_protocol_agnostic_flow: optimize script |

Checks

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

Commit Message

Jiale, SongX Feb. 24, 2023, 4:51 p.m. UTC
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 <songx.jiale@intel.com>
---
 tests/TestSuite_iavf_rss_protocol_agnostic_flow.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Tu, Lijuan March 7, 2023, 3:55 a.m. UTC | #1
On Fri, 24 Feb 2023 16:51:50 +0000, Jiale Song <songx.jiale@intel.com> wrote:
> 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 <songx.jiale@intel.com>


Applied, thanks
  

Patch

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(