test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running
@ 2017-11-16  2:39 Jianbo Liu
  2018-01-03  9:03 ` Jianbo Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Jianbo Liu @ 2017-11-16  2:39 UTC (permalink / raw)
  To: dts; +Cc: Jianbo Liu

From: Jianbo Liu <jianbo.liu@arm.com>

Unbinding all the ports to avoid system panic, because there are many cases
running as secondary processes in this tests.

Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
---
 tests/TestSuite_unit_tests_eal.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py
index b619572..e513739 100644
--- a/tests/TestSuite_unit_tests_eal.py
+++ b/tests/TestSuite_unit_tests_eal.py
@@ -7,6 +7,7 @@ EAL autotest.
 
 """
 
+import copy
 import utils
 
 
@@ -30,6 +31,11 @@ class TestUnitTestsEal(TestCase):
         """
         Run at the start of each test suite.
         """
+        self.dut_ports = self.dut.get_ports(self.nic)
+        self.unbind_ports = copy.deepcopy(self.dut_ports)
+        if len(self.unbind_ports) > 0:
+            self.dut.unbind_interfaces_linux(self.unbind_ports)
+
         # icc compilation cost long long time.
         [arch, machine, self.env, toolchain] = self.target.split('-')
         self.start_test_time = 60
@@ -397,4 +403,5 @@ class TestUnitTestsEal(TestCase):
         """
         Run after each test suite.
         """
-        pass
+        if len(self.unbind_ports) > 0:
+            self.dut.bind_interfaces_linux(nics_to_bind=self.unbind_ports)
-- 
1.9.1

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

* Re: [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running
  2017-11-16  2:39 [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running Jianbo Liu
@ 2018-01-03  9:03 ` Jianbo Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Jianbo Liu @ 2018-01-03  9:03 UTC (permalink / raw)
  To: dts, Liu, Yong; +Cc: Jianbo Liu

Hi Yong,

Should I need more changes for this patch?

Thanks!
Jianbo

On 16 November 2017 at 10:39, Jianbo Liu <jianbo.liu@linaro.org> wrote:
> From: Jianbo Liu <jianbo.liu@arm.com>
>
> Unbinding all the ports to avoid system panic, because there are many cases
> running as secondary processes in this tests.
>
> Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
> ---
>  tests/TestSuite_unit_tests_eal.py | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py
> index b619572..e513739 100644
> --- a/tests/TestSuite_unit_tests_eal.py
> +++ b/tests/TestSuite_unit_tests_eal.py
> @@ -7,6 +7,7 @@ EAL autotest.
>
>  """
>
> +import copy
>  import utils
>
>
> @@ -30,6 +31,11 @@ class TestUnitTestsEal(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> +        self.dut_ports = self.dut.get_ports(self.nic)
> +        self.unbind_ports = copy.deepcopy(self.dut_ports)
> +        if len(self.unbind_ports) > 0:
> +            self.dut.unbind_interfaces_linux(self.unbind_ports)
> +
>          # icc compilation cost long long time.
>          [arch, machine, self.env, toolchain] = self.target.split('-')
>          self.start_test_time = 60
> @@ -397,4 +403,5 @@ class TestUnitTestsEal(TestCase):
>          """
>          Run after each test suite.
>          """
> -        pass
> +        if len(self.unbind_ports) > 0:
> +            self.dut.bind_interfaces_linux(nics_to_bind=self.unbind_ports)
> --
> 1.9.1
>

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

end of thread, other threads:[~2018-01-03  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16  2:39 [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running Jianbo Liu
2018-01-03  9:03 ` Jianbo Liu

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).