test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jianbo Liu <jianbo.liu@linaro.org>
To: dts@dpdk.org
Cc: Jianbo Liu <jianbo.liu@arm.com>
Subject: [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running
Date: Thu, 16 Nov 2017 10:39:42 +0800	[thread overview]
Message-ID: <1510799982-14113-1-git-send-email-jianbo.liu@linaro.org> (raw)

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

             reply	other threads:[~2017-11-16  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16  2:39 Jianbo Liu [this message]
2018-01-03  9:03 ` Jianbo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510799982-14113-1-git-send-email-jianbo.liu@linaro.org \
    --to=jianbo.liu@linaro.org \
    --cc=dts@dpdk.org \
    --cc=jianbo.liu@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).