[V1,3/3] tests/ice_limit_value_test: optimize scripts

Message ID 20221115074214.62185-3-hongbox.li@intel.com (mailing list archive)
State Changes Requested
Headers
Series [V1,1/3] tests/ice_iavf_fdir: optimize scripts |

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 fail Testing issues

Commit Message

Li, HongboX Nov. 15, 2022, 7:42 a.m. UTC
  1.when the dpdk testpmd exits abnormally, the port will not be initialized, and sometimes
the test of other 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: Hongbo Li <hongbox.li@intel.com>
---
 tests/TestSuite_ice_limit_value_test.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
  

Comments

Jiale, SongX Nov. 17, 2022, 7:48 a.m. UTC | #1
> -----Original Message-----
> From: Hongbo Li <hongbox.li@intel.com>
> Sent: Tuesday, November 15, 2022 3:42 PM
> To: dts@dpdk.org
> Cc: Li, HongboX <hongbox.li@intel.com>
> Subject: [dts] [PATCH V1 3/3] tests/ice_limit_value_test: optimize scripts
> 
> 1.when the dpdk testpmd exits abnormally, the port will not be initialized,
> and sometimes the test of other 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: Hongbo Li <hongbox.li@intel.com>
> ---
Tested-by: Song Jiale <songx.jiale@intel.com>
  

Patch

diff --git a/tests/TestSuite_ice_limit_value_test.py b/tests/TestSuite_ice_limit_value_test.py
index b75cea84..b5bc6dc2 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()