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 7200A5A76 for ; Mon, 9 Mar 2015 09:22:31 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 09 Mar 2015 01:22:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,366,1422950400"; d="scan'208";a="689036937" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga002.fm.intel.com with ESMTP; 09 Mar 2015 01:22:29 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 9 Mar 2015 16:22:28 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.197]) by shsmsx102.ccr.corp.intel.com ([169.254.2.62]) with mapi id 14.03.0195.001; Mon, 9 Mar 2015 16:22:27 +0800 From: "Liu, Yong" To: "Zhang, XiaonanX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Thread-Index: AQHQUzHPTcJmqt7aAUCTVWnGHbukug== Date: Mon, 9 Mar 2015 08:22:26 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D86C6B@SHSMSX103.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> <86228AFD5BCD8E4EBFD2B90117B5E81E10D82E91@SHSMSX103.ccr.corp.intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E10D84D79@SHSMSX103.ccr.corp.intel.com> <63FB47D6C0357E428AA804B2C89068BA012ABA67@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, 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, 09 Mar 2015 08:22:32 -0000 Thanks, applied.=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: Liu, Yong =0A= > Sent: Thursday, March 05, 2015 3:00 PM=0A= > To: Liu, Yong; Zhang, XiaonanX; dts@dpdk.org=0A= > Subject: RE: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 an= d freebsd=0A= >=0A= > Xiaonan,=0A= > Your issue will be fixed by latest patch below. Can you try it in your en= vironment?=0A= >=0A= > [PATCH] framework/ssh: add session buffer flush before every command=0A= >=0A= >> -----Original Message-----=0A= >> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong=0A= >> Sent: Saturday, February 28, 2015 4:37 PM=0A= >> To: Zhang, XiaonanX; dts@dpdk.org=0A= >> Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 a= nd=0A= >> freebsd=0A= >>=0A= >> Hi Xiaonan,=0A= >> Function send_expect_base is one of the basic functions in DTS=0A= >> framework. So we should not just move back and work around this issue.= =0A= >> This issue should be investigated and fixed. You can look into it=0A= >> and help us get to know the root cause of why ret_status is not int.=0A= >>=0A= >> Thanks,=0A= >> Marvin=0A= >>=0A= >>> -----Original Message-----=0A= >>> From: Zhang, XiaonanX=0A= >>> Sent: Saturday, February 28, 2015 4:27 PM=0A= >>> To: Zhang, XiaonanX; Liu, Yong; dts@dpdk.org=0A= >>> Subject: RE: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21= =0A= >> and=0A= >>> freebsd=0A= >>>=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=0A= >> command=0A= >>> 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= >>> BTW, I suggested we still used expect function, firstly, there are= =0A= >> many=0A= >>> fcoe ports on fedora21 platform, we should split it,=0A= >>> But ret_status this position has error when we test dpdk package,=0A= >>> 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= =0A= >> and=0A= >>> 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= =0A= >>> freebsd=0A= >>>=0A= >>> Some nic like FVL have more than only one interface on Fedora21, DTS=0A= >> will=0A= >>> take=0A= >>> the first one as functional one. Not all OS has alias "ll" available,= =0A= >> use=0A= >>> "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=0A= >> /sys/bus/pci/devices/0000:%s:%s/net' %=0A= >>> (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_di= r),=0A= >>> + out =3D self.send_expect("ls %s && cd %s" % (dst_dir, p_di= r),=0A= >>> "#", verify=3DTrue)=0A= >>> if out =3D=3D -1:=0A= >>> raise ValueError("Directiry %s or %s does not exist,"= =0A= >>> --=0A= >>> 1.9.3=0A= >=0A= =0A=