test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/ice_dcf_disable_acl_filter:optimize code for testpmd status flag
@ 2023-06-14 18:03 Zhimin Huang
  0 siblings, 0 replies; only message in thread
From: Zhimin Huang @ 2023-06-14 18:03 UTC (permalink / raw)
  To: dts; +Cc: Zhimin Huang

if the case validation failed,the testpmd_status will not be assigned value.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/TestSuite_ice_dcf_disable_acl_filter.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_ice_dcf_disable_acl_filter.py b/tests/TestSuite_ice_dcf_disable_acl_filter.py
index 7e12ad0e..937ba406 100644
--- a/tests/TestSuite_ice_dcf_disable_acl_filter.py
+++ b/tests/TestSuite_ice_dcf_disable_acl_filter.py
@@ -234,11 +234,11 @@ class TestICEDCFDisableACLFilter(TestCase):
         # get the average
         avg_start_up_time_acl_on = sum(start_up_time_acl_on) / repeat_time
         avg_start_up_time_acl_off = sum(start_up_time_acl_off) / repeat_time
+        self.testpmd_status = "close"
         self.verify(
             avg_start_up_time_acl_on > avg_start_up_time_acl_off,
             "disable acl to reduce startup time failed!!!",
         )
-        self.testpmd_status = "close"
 
     def test_disable_acl(self):
         """
@@ -267,9 +267,8 @@ class TestICEDCFDisableACLFilter(TestCase):
                 self.logger.warning((RED(e)))
                 self.logger.info((GREEN("case failed: %s" % subcase["name"])))
                 subcases["result"].append(False)
-        self.verify(all(subcases["result"]), "test disable acl engine failed.")
-
         self.testpmd_status = "open"
+        self.verify(all(subcases["result"]), "test disable acl engine failed.")
 
     def quit_testpmd(self):
         """
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-14  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 18:03 [dts][PATCH V1] tests/ice_dcf_disable_acl_filter:optimize code for testpmd status flag Zhimin Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).