test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Add steps to clean environment
@ 2020-05-21  9:31 ChenBo
  2020-05-21  9:36 ` Chen, BoX C
  2020-05-29  8:35 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: ChenBo @ 2020-05-21  9:31 UTC (permalink / raw)
  To: dts; +Cc: ChenBo

If the test result is failed, the IP set previously will be reserved, need del IP

Signed-off-by: ChenBo <box.c.chen@intel.com>
---
 tests/TestSuite_kni.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 2b2281d..d518f3e 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -1210,7 +1210,11 @@ class TestKni(TestCase):
         """
         Run after each test case.
         """
-        pass
+        if self._suite_result.test_case == "test_ping":
+            for port in self.config['ports']:
+                tx_port = self.tester.get_local_port(port)
+                tx_interface = self.tester.get_interface(tx_port)
+                self.tester.send_expect("ip addr flush %s" % tx_interface, "# ")
 
     def tear_down_all(self):
         """
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-29  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21  9:31 [dts] [PATCH V1] Add steps to clean environment ChenBo
2020-05-21  9:36 ` Chen, BoX C
2020-05-29  8:35 ` Tu, Lijuan

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).