[dts] [PATCH V1] Add steps to clean environment

Tu, Lijuan lijuan.tu at intel.com
Fri May 29 10:35:23 CEST 2020


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of ChenBo
> Sent: Thursday, May 21, 2020 5:32 PM
> To: dts at dpdk.org
> Cc: Chen, BoX C <box.c.chen at intel.com>
> 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 <box.c.chen at 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



More information about the dts mailing list