From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4D6D4595A for ; Mon, 2 Mar 2015 05:50:56 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 01 Mar 2015 20:49:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,674,1418112000"; d="scan'208";a="659018045" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga001.jf.intel.com with ESMTP; 01 Mar 2015 20:50:54 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 2 Mar 2015 12:50:52 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.161]) with mapi id 14.03.0195.001; Mon, 2 Mar 2015 12:50:51 +0800 From: "Qiu, Michael" 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: AQHQUzBZQPSjxckUzE2SHE0Xmwup5Q== Date: Mon, 2 Mar 2015 04:50:51 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CECFC5@SHSMSX101.ccr.corp.intel.com> References: <1425020951-29498-1-git-send-email-yong.liu@intel.com> <63FB47D6C0357E428AA804B2C89068BA012A978B@SHSMSX104.ccr.corp.intel.com> <63FB47D6C0357E428AA804B2C89068BA012A9804@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: Mon, 02 Mar 2015 04:50:57 -0000 On 2/28/2015 4:27 PM, Zhang, XiaonanX wrote:=0A= > Hi Yong,=0A= > When we tested DPDK package, we found a fault,=0A= > In this [dts] [PATCH 4/6] framework/ssh: Add verify ability for command= execution patch, there are one function send_expect,=0A= >=0A= > def send_expect(self, command, expected, timeout=3D15, verify=3DFalse):= =0A= >> + ret =3D self.send_expect_base(command, expected, timeout)=0A= >> + if verify:=0A= >> + ret_status =3D self.send_expect_base("echo $?", expected)= =0A= >> + if not int(ret_status):=0A= >> + return ret=0A= >> + else:=0A= >> + return -1=0A= >> + else:=0A= >> + return ret=0A= >> +=0A= > This function have no ret;=0A= =0A= Hi, Xiaonan=0A= =0A= Why no ret? I haven't got your point.=0A= =0A= =0A= Thanks,=0A= Michael=0A= > BTW, I suggested we still used expect function, firstly, there are man= y fcoe ports on fedora21 platform, we should split it,=0A= > But ret_status this position has error when we test dpdk package, ret_= status sometimes have return value not int;=0A= >=0A= > out =3D self.send_expect(command, '# ', 5)=0A= > + name =3D out.split('\t')[0]=0A= >=0A= > Best Regards=0A= > Xiaonan=0A= >=0A= > -----Original Message-----=0A= > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Zhang, XiaonanX=0A= > Sent: Saturday, February 28, 2015 11:22 AM=0A= > To: Liu, Yong; dts@dpdk.org=0A= > Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 an= d freebsd=0A= >=0A= >=0A= > Acked-by: Xiaonan Zhang =0A= > - Tested OS: FC21=0A= > - Kernel: 3.17.1-302.fc21.x86_64=0A= > - GCC: gcc version 4.9.1 20140930 (Red Hat 4.9.1-11) (GCC)=0A= > - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz=0A= > - NIC: Intel Corporation Ethernet Controller X710 for 10GbE SFP+=0A= > - Default x86_64-native-linuxapp-gcc configuration=0A= >=0A= > -----Original Message-----=0A= > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yong Liu=0A= > Sent: Friday, February 27, 2015 3:09 PM=0A= > To: dts@dpdk.org=0A= > Subject: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and fr= eebsd=0A= >=0A= > Some nic like FVL have more than only one interface on Fedora21, DTS will= take=0A= > the first one as functional one. Not all OS has alias "ll" available, use= "ls"=0A= > in replace of it.=0A= >=0A= > Signed-off-by: Marvinliu =0A= >=0A= > diff --git a/framework/crb.py b/framework/crb.py=0A= > index 28df2f9..a699bfc 100644=0A= > --- a/framework/crb.py=0A= > +++ b/framework/crb.py=0A= > @@ -191,7 +191,12 @@ class Crb(object):=0A= > Get interface name of specified pci device on linux.=0A= > """=0A= > command =3D 'ls --color=3Dnever /sys/bus/pci/devices/0000:%s:%s/= net' % (bus_id, devfun_id)=0A= > - return self.send_expect(command, '# ')=0A= > + out =3D self.send_expect(command, '# ', verify=3DTrue)=0A= > + if out =3D=3D -1:=0A= > + name =3D ""=0A= > + else:=0A= > + name =3D out.split()[0]=0A= > + return name=0A= > =0A= > def get_interface_name_freebsd(self, bus_id, devfun_id):=0A= > """=0A= > diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py=0A= > index a6ac218..bc6ccca 100644=0A= > --- a/framework/project_dpdk.py=0A= > +++ b/framework/project_dpdk.py=0A= > @@ -202,7 +202,7 @@ class DPDKdut(Dut):=0A= > # ToDo: make this configurable=0A= > dst_dir =3D "/tmp/"=0A= > =0A= > - out =3D self.send_expect("ll %s && cd %s" % (dst_dir, p_dir)= ,=0A= > + out =3D self.send_expect("ls %s && cd %s" % (dst_dir, p_dir)= ,=0A= > "#", verify=3DTrue)=0A= > if out =3D=3D -1:=0A= > raise ValueError("Directiry %s or %s does not exist,"=0A= =0A=