From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CBFCC903 for ; Sat, 28 Feb 2015 09:27:01 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 28 Feb 2015 00:26:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,666,1418112000"; d="scan'208";a="684755710" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by fmsmga002.fm.intel.com with ESMTP; 28 Feb 2015 00:26:56 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 28 Feb 2015 16:26:53 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0195.001; Sat, 28 Feb 2015 16:26:52 +0800 From: "Zhang, XiaonanX" To: "Zhang, XiaonanX" , "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Thread-Index: AQHQUzBNPYjqE4i0fUWML0XRd2J+5A== Date: Sat, 28 Feb 2015 08:26:51 +0000 Message-ID: <63FB47D6C0357E428AA804B2C89068BA012A9804@SHSMSX104.ccr.corp.intel.com> References: <1425020951-29498-1-git-send-email-yong.liu@intel.com> <63FB47D6C0357E428AA804B2C89068BA012A978B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <63FB47D6C0357E428AA804B2C89068BA012A978B@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: A3Jb A7ia CVOh CoHM C2M5 DFOx DVcf De7K EYrk Gguw G6K4 IC/m KhPq KmYk LRsP MBrI; 1; ZAB0AHMAQABkAHAAZABrAC4AbwByAGcA; Sosha1_v1; 7; {5C8BDE08-8DCA-4F7C-8CF1-BDC8F2671415}; eABpAGEAbwBuAGEAbgB4AC4AegBoAGEAbgBnAEAAaQBuAHQAZQBsAC4AYwBvAG0A; Sat, 28 Feb 2015 08:33:22 GMT; UgBFADoAIABbAGQAdABzAF0AIABbAFAAQQBUAEMASABdACAAYgB1AGcAIABmAGkAeAA6ACAAZgBpAHgAIABpAHMAcwB1AGUAIAB3AGgAZQBuACAARABUAFMAIAByAHUAbgAgAG8AbgAgAEYAZQBkAG8AcgBhADIAMQAJAGEAbgBkAAkAZgByAGUAZQBiAHMAZAA= x-cr-puzzleid: {5C8BDE08-8DCA-4F7C-8CF1-BDC8F2671415} x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and 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: Sat, 28 Feb 2015 08:27:02 -0000 Hi Yong, When we tested DPDK package, we found a fault, In this [dts] [PATCH 4/6] framework/ssh: Add verify ability for command e= xecution patch, there are one function send_expect, def send_expect(self, command, expected, timeout=3D15, verify=3DFalse): > + ret =3D self.send_expect_base(command, expected, timeout) > + if verify: > + ret_status =3D self.send_expect_base("echo $?", expected) > + if not int(ret_status): > + return ret > + else: > + return -1 > + else: > + return ret > + This function have no ret; BTW, I suggested we still used expect function, firstly, there are many = fcoe ports on fedora21 platform, we should split it, But ret_status this position has error when we test dpdk package, ret_st= atus sometimes have return value not int; out =3D self.send_expect(command, '# ', 5) + name =3D out.split('\t')[0] Best Regards Xiaonan -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Zhang, XiaonanX Sent: Saturday, February 28, 2015 11:22 AM To: Liu, Yong; dts@dpdk.org Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and = freebsd Acked-by: Xiaonan Zhang - Tested OS: FC21 - Kernel: 3.17.1-302.fc21.x86_64 - GCC: gcc version 4.9.1 20140930 (Red Hat 4.9.1-11) (GCC) - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - NIC: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ - Default x86_64-native-linuxapp-gcc configuration -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yong Liu Sent: Friday, February 27, 2015 3:09 PM To: dts@dpdk.org Subject: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and free= bsd Some nic like FVL have more than only one interface on Fedora21, DTS will t= ake the first one as functional one. Not all OS has alias "ll" available, use "= ls" in replace of it. Signed-off-by: Marvinliu diff --git a/framework/crb.py b/framework/crb.py index 28df2f9..a699bfc 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -191,7 +191,12 @@ class Crb(object): Get interface name of specified pci device on linux. """ command =3D 'ls --color=3Dnever /sys/bus/pci/devices/0000:%s:%s/ne= t' % (bus_id, devfun_id) - return self.send_expect(command, '# ') + out =3D self.send_expect(command, '# ', verify=3DTrue) + if out =3D=3D -1: + name =3D "" + else: + name =3D out.split()[0] + return name =20 def get_interface_name_freebsd(self, bus_id, devfun_id): """ diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index a6ac218..bc6ccca 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -202,7 +202,7 @@ class DPDKdut(Dut): # ToDo: make this configurable dst_dir =3D "/tmp/" =20 - out =3D self.send_expect("ll %s && cd %s" % (dst_dir, p_dir), + out =3D self.send_expect("ls %s && cd %s" % (dst_dir, p_dir), "#", verify=3DTrue) if out =3D=3D -1: raise ValueError("Directiry %s or %s does not exist," --=20 1.9.3