[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
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
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
@@ -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(