test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case
@ 2020-03-11  6:14 Xiao Qimai
  2020-03-11  6:23 ` Xiao, QimaiX
  2020-03-13  6:52 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Qimai @ 2020-03-11  6:14 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. fix failed case interferes other cases

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py
index f361373..96ce734 100644
--- a/tests/TestSuite_pvp_vhost_user_reconnect.py
+++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
@@ -320,7 +320,6 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_testpmd_start()
             self.send_and_verify(vm_cycle, "reconnet from VM")
         self.result_table_print()
-        self.stop_all_apps()
 
     def test_perf_split_ring_reconnet_two_vms(self):
         """
@@ -352,7 +351,6 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_testpmd_start()
             self.send_and_verify(vm_cycle, "reconnet from VM")
         self.result_table_print()
-        self.stop_all_apps()
 
     def test_perf_split_ring_vm2vm_virtio_net_reconnet_two_vms(self):
         """
@@ -419,7 +417,6 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_testpmd_start()
             self.send_and_verify(vm_cycle, "reconnet from VM")
         self.result_table_print()
-        self.stop_all_apps()
 
     def test_perf_packed_ring_reconnet_two_vms(self):
         """
@@ -451,7 +448,6 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_testpmd_start()
             self.send_and_verify(vm_cycle, "reconnet from VM")
         self.result_table_print()
-        self.stop_all_apps()
 
     def test_perf_packed_ring_virtio_net_reconnet_two_vms(self):
         """
@@ -492,12 +488,18 @@ class TestPVPVhostUserReconnect(TestCase):
         #
         # Run after each test case.
         #
-        self.dut.send_expect("killall -s INT testpmd", "# ")
-        self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
+        try:
+            self.stop_all_apps()
+        except Exception as e:
+            self.logger.warning(e)
+        finally:
+            self.dut.kill_all()
+            self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
         time.sleep(2)
 
     def tear_down_all(self):
         """
         Run after each test suite.
         """
+        self.dut.kill_all()
         pass
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case
  2020-03-11  6:14 [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case Xiao Qimai
@ 2020-03-11  6:23 ` Xiao, QimaiX
  2020-03-13  6:52 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Xiao, QimaiX @ 2020-03-11  6:23 UTC (permalink / raw)
  To: dts

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai

> -----Original Message-----
> From: Xiao, QimaiX
> Sent: Wednesday, March 11, 2020 2:15 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts][PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix
> teardown to avoid interfere next case
> 
> *. fix failed case interferes other cases
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py
> b/tests/TestSuite_pvp_vhost_user_reconnect.py
> index f361373..96ce734 100644
> --- a/tests/TestSuite_pvp_vhost_user_reconnect.py
> +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
> @@ -320,7 +320,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_split_ring_reconnet_two_vms(self):
>          """
> @@ -352,7 +351,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_split_ring_vm2vm_virtio_net_reconnet_two_vms(self):
>          """
> @@ -419,7 +417,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_packed_ring_reconnet_two_vms(self):
>          """
> @@ -451,7 +448,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_packed_ring_virtio_net_reconnet_two_vms(self):
>          """
> @@ -492,12 +488,18 @@ class TestPVPVhostUserReconnect(TestCase):
>          #
>          # Run after each test case.
>          #
> -        self.dut.send_expect("killall -s INT testpmd", "# ")
> -        self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
> +        try:
> +            self.stop_all_apps()
> +        except Exception as e:
> +            self.logger.warning(e)
> +        finally:
> +            self.dut.kill_all()
> +            self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
>          time.sleep(2)
> 
>      def tear_down_all(self):
>          """
>          Run after each test suite.
>          """
> +        self.dut.kill_all()
>          pass
> --
> 1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case
  2020-03-11  6:14 [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case Xiao Qimai
  2020-03-11  6:23 ` Xiao, QimaiX
@ 2020-03-13  6:52 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-03-13  6:52 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Wednesday, March 11, 2020 2:15 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix
> teardown to avoid interfere next case
> 
> *. fix failed case interferes other cases
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py
> b/tests/TestSuite_pvp_vhost_user_reconnect.py
> index f361373..96ce734 100644
> --- a/tests/TestSuite_pvp_vhost_user_reconnect.py
> +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
> @@ -320,7 +320,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_split_ring_reconnet_two_vms(self):
>          """
> @@ -352,7 +351,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_split_ring_vm2vm_virtio_net_reconnet_two_vms(self):
>          """
> @@ -419,7 +417,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_packed_ring_reconnet_two_vms(self):
>          """
> @@ -451,7 +448,6 @@ class TestPVPVhostUserReconnect(TestCase):
>              self.vm_testpmd_start()
>              self.send_and_verify(vm_cycle, "reconnet from VM")
>          self.result_table_print()
> -        self.stop_all_apps()
> 
>      def test_perf_packed_ring_virtio_net_reconnet_two_vms(self):
>          """
> @@ -492,12 +488,18 @@ class TestPVPVhostUserReconnect(TestCase):
>          #
>          # Run after each test case.
>          #
> -        self.dut.send_expect("killall -s INT testpmd", "# ")
> -        self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
> +        try:
> +            self.stop_all_apps()
> +        except Exception as e:
> +            self.logger.warning(e)
> +        finally:
> +            self.dut.kill_all()
> +            self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
>          time.sleep(2)
> 
>      def tear_down_all(self):
>          """
>          Run after each test suite.
>          """
> +        self.dut.kill_all()
>          pass
> --
> 1.8.3.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-03-11  6:14 [dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case Xiao Qimai
2020-03-11  6:23 ` Xiao, QimaiX
2020-03-13  6:52 ` 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