test suite reviews and discussions
 help / color / 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

* Re: [dts] [PATCH V1] Add steps to clean environment
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Chen, BoX C @ 2020-05-21  9:36 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

Tested-by: Chen, BoX C <box.c.chen@intel.com>

Regards,
Chen Bo

> -----Original Message-----
> From: Chen, BoX C <box.c.chen@intel.com>
> Sent: May 21, 2020 17:32
> To: dts@dpdk.org
> Cc: Chen, BoX C <box.c.chen@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@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


[-- Attachment #2: TestKni.log --]
[-- Type: application/octet-stream, Size: 70504 bytes --]

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

* Re: [dts] [PATCH V1] Add steps to clean environment
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-05-29  8:35 UTC (permalink / raw)
  To: Chen, BoX C, dts; +Cc: Chen, BoX C

Applied, thanks

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

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

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox