[dts] [PATCH V1]tests/TestSuite_pvp_vhost_user_reconnect: fix teardown to avoid interfere next case

Xiao, QimaiX qimaix.xiao at intel.com
Wed Mar 11 07:23:34 CET 2020


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

Regards,
Xiao Qimai

> -----Original Message-----
> From: Xiao, QimaiX
> Sent: Wednesday, March 11, 2020 2:15 PM
> To: dts at dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao at 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 at 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



More information about the dts mailing list