From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6EE577D42 for ; Wed, 23 Aug 2017 10:50:12 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 01:50:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,415,1498546800"; d="scan'208";a="127293560" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 23 Aug 2017 01:50:10 -0700 From: "xu,gang" To: dts@dpdk.org Cc: "xu,gang" Date: Wed, 23 Aug 2017 16:51:26 +0800 Message-Id: <1503478286-86887-1-git-send-email-gangx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] fix Pmd blocked on FreeBSD 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: Wed, 23 Aug 2017 08:50:12 -0000 dts have not bind_driver() on FreeBSD Signed-off-by: xu,gang --- tests/TestSuite_pmd.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index 8f4b22c..dccaade 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -83,18 +83,18 @@ class TestPmd(TestCase,IxiaPacketGenerator): # Based on h/w type, choose how many ports to use self.dut_ports = self.dut.get_ports() - - # Get dut system information - port_num = self.dut_ports[0] - pci_device_id = self.dut.ports_info[port_num]['pci'] - ori_driver = self.dut.ports_info[port_num]['port'].get_nic_driver() - self.dut.ports_info[port_num]['port'].bind_driver() - - sut = SystemInfo(self.dut, pci_device_id) - self.system_info = sut.get_system_info() - self.nic_info = sut.get_nic_info() - - self.dut.ports_info[port_num]['port'].bind_driver(ori_driver) + if self.dut.get_os_type() == 'linux': + # Get dut system information + port_num = self.dut_ports[0] + pci_device_id = self.dut.ports_info[port_num]['pci'] + ori_driver = self.dut.ports_info[port_num]['port'].get_nic_driver() + self.dut.ports_info[port_num]['port'].bind_driver() + + sut = SystemInfo(self.dut, pci_device_id) + self.system_info = sut.get_system_info() + self.nic_info = sut.get_nic_info() + + self.dut.ports_info[port_num]['port'].bind_driver(ori_driver) ###### self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[ -- 1.9.3