From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4A190C328 for ; Fri, 5 Jun 2015 07:50:30 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 04 Jun 2015 22:50:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,556,1427785200"; d="scan'208";a="721168402" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 04 Jun 2015 22:50:28 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t555oQp7014606; Fri, 5 Jun 2015 13:50:26 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t555oOGo001721; Fri, 5 Jun 2015 13:50:26 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t555oOPr001717; Fri, 5 Jun 2015 13:50:24 +0800 From: "huilong,xu" To: dts@dpdk.org Date: Fri, 5 Jun 2015 13:50:18 +0800 Message-Id: <1433483418-1673-3-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1433483418-1673-1-git-send-email-huilongx.xu@intel.com> References: <1433483418-1673-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH V1 3/3] update get_intf_name function 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: Fri, 05 Jun 2015 05:50:30 -0000 From: huilong xu change list: 1.in linux kernerl 3.13+, i40e kerner driver merger in kernel module. the kernerl default driver, one NIC have two intface name, so we must get one intface name for test Signed-off-by: huilong xu --- framework/net_device.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/framework/net_device.py b/framework/net_device.py index b8d785e..3b0a8d5 100644 --- a/framework/net_device.py +++ b/framework/net_device.py @@ -154,7 +154,10 @@ class NetDevice(object): """ command = 'ls --color=never /sys/bus/pci/devices/0000\:%s\:%s/net' % ( bus_id, devfun_id) - return self.__send_expect(command, '# ') + intf_name = self.__send_expect(command, '# ') + if " " in intf_name: + return intf_name.split(" ")[0] + return intf_name def get_interface_name_freebsd(self, bus_id, devfun_id, driver): """ -- 1.7.4.4