[dts] [PATCH V1 2/2] tests/ice_limit_value_test: optimize scripts

Song Jiale songx.jiale at intel.com
Wed Dec 21 18:18:40 CET 2022


1. when the dpdk testpmd exits abnormally, the port will not be initialized, and sometimes
the other test cases will be affected. therefore, after the test, should use quit to
close the dpdk testpmd normally to avoid the impact between cases.
2. the object named "self.session_third" is undefined, delete useless code.

Signed-off-by: Song Jiale <songx.jiale at intel.com>
---
 tests/TestSuite_ice_limit_value_test.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_ice_limit_value_test.py b/tests/TestSuite_ice_limit_value_test.py
index 06160c0a..d6f2f969 100644
--- a/tests/TestSuite_ice_limit_value_test.py
+++ b/tests/TestSuite_ice_limit_value_test.py
@@ -1256,13 +1256,10 @@ class TestICELimitValue(TestCase):
 
     def tear_down(self):
         # destroy all flow rule on port 0
-        self.dut.kill_all()
-        self.destroy_env()
         if getattr(self, "session_secondary", None):
             self.dut.close_session(self.session_secondary)
-        if getattr(self, "session_third", None):
-            self.dut.close_session(self.session_third)
+        self.destroy_env()
+        self.dut.kill_all()
 
     def tear_down_all(self):
         self.dut.kill_all()
-        self.destroy_env()
-- 
2.17.1



More information about the dts mailing list