From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 672141B1BC for ; Thu, 16 Nov 2017 03:40:51 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E1591435; Wed, 15 Nov 2017 18:40:50 -0800 (PST) Received: from ubuntu-jianbo.shanghai.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E979F3F24A; Wed, 15 Nov 2017 18:40:49 -0800 (PST) From: Jianbo Liu To: dts@dpdk.org Cc: Jianbo Liu Date: Thu, 16 Nov 2017 10:39:42 +0800 Message-Id: <1510799982-14113-1-git-send-email-jianbo.liu@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [dts] [PATCH] tests/unit_tests_eal: unbind all the ports before running X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 02:40:51 -0000 From: Jianbo Liu 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 --- 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