test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/kernelpf_iavf: destory env need remove to run after this case
@ 2020-07-01  9:30 Xie wei
  2020-07-02  7:17 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xie wei @ 2020-07-01  9:30 UTC (permalink / raw)
  To: dts; +Cc: Xie wei

If vf_rx_interrupt verified failed, it can't restore env and influence
after cases.

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_kernelpf_iavf.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index fd48fa2..6fb1bae 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -891,9 +891,6 @@ class TestKernelpfIavf(TestCase):
         self.verify('L3FWD_POWER: lcore 6 is waked up from rx interrupt' in out, 'lcore 6 is not waked up')
         self.verify('L3FWD_POWER: lcore 7 is waked up from rx interrupt' in out, 'lcore 7 is not waked up')
         self.dut.send_expect("killall l3fwd-power", "# ", 60, alt_session=True)
-        self.interrupt_flag = True
-        time.sleep(1)
-        self.destroy_2vf_in_2pf()
 
     def test_vf_unicast(self):
         self.vm_testpmd.start_testpmd("all")
@@ -984,8 +981,9 @@ class TestKernelpfIavf(TestCase):
         """
         Run after each test case.
         """
-        if self.interrupt_flag is True:
-            self.interrupt_flag = False
+        if self.running_case == "test_vf_rx_interrupt"::
+            self.dut.send_expect("killall l3fwd-power", "# ", 60, alt_session=True)
+            self.destroy_2vf_in_2pf()
         else:
             self.vm_testpmd.execute_cmd("quit", "#")
             time.sleep(1)
-- 
2.17.1


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

* Re: [dts] [PATCH V1] tests/kernelpf_iavf: destory env need remove to run after this case
  2020-07-01  9:30 [dts] [PATCH V1] tests/kernelpf_iavf: destory env need remove to run after this case Xie wei
@ 2020-07-02  7:17 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-07-02  7:17 UTC (permalink / raw)
  To: Xie, WeiX, dts; +Cc: Xie, WeiX

Applied, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xie wei
> Sent: 2020年7月1日 17:31
> To: dts@dpdk.org
> Cc: Xie, WeiX <weix.xie@intel.com>
> Subject: [dts] [PATCH V1] tests/kernelpf_iavf: destory env need remove to run
> after this case
> 
> If vf_rx_interrupt verified failed, it can't restore env and influence after cases.
> 
> Signed-off-by: Xie wei <weix.xie@intel.com>
> ---
>  tests/TestSuite_kernelpf_iavf.py | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
> index fd48fa2..6fb1bae 100644
> --- a/tests/TestSuite_kernelpf_iavf.py
> +++ b/tests/TestSuite_kernelpf_iavf.py
> @@ -891,9 +891,6 @@ class TestKernelpfIavf(TestCase):
>          self.verify('L3FWD_POWER: lcore 6 is waked up from rx interrupt' in out,
> 'lcore 6 is not waked up')
>          self.verify('L3FWD_POWER: lcore 7 is waked up from rx interrupt' in out,
> 'lcore 7 is not waked up')
>          self.dut.send_expect("killall l3fwd-power", "# ", 60, alt_session=True)
> -        self.interrupt_flag = True
> -        time.sleep(1)
> -        self.destroy_2vf_in_2pf()
> 
>      def test_vf_unicast(self):
>          self.vm_testpmd.start_testpmd("all")
> @@ -984,8 +981,9 @@ class TestKernelpfIavf(TestCase):
>          """
>          Run after each test case.
>          """
> -        if self.interrupt_flag is True:
> -            self.interrupt_flag = False
> +        if self.running_case == "test_vf_rx_interrupt"::
> +            self.dut.send_expect("killall l3fwd-power", "# ", 60, alt_session=True)
> +            self.destroy_2vf_in_2pf()
>          else:
>              self.vm_testpmd.execute_cmd("quit", "#")
>              time.sleep(1)
> --
> 2.17.1


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

end of thread, other threads:[~2020-07-02  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  9:30 [dts] [PATCH V1] tests/kernelpf_iavf: destory env need remove to run after this case Xie wei
2020-07-02  7:17 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).