Tested-by: Chen, BoX C Regards, Chen Bo > -----Original Message----- > From: Chen, BoX C > Sent: May 21, 2020 17:32 > To: dts@dpdk.org > Cc: Chen, BoX C > Subject: [dts][PATCH V1] Add steps to clean environment > > If the test result is failed, the IP set previously will be reserved, need del IP > > Signed-off-by: ChenBo > --- > 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