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 D25976A80 for ; Mon, 9 Mar 2015 03:37:23 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 08 Mar 2015 19:37:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,365,1422950400"; d="scan'208";a="695714002" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga002.jf.intel.com with ESMTP; 08 Mar 2015 19:37:22 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 9 Mar 2015 10:37:20 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.197]) with mapi id 14.03.0195.001; Mon, 9 Mar 2015 10:37:19 +0800 From: "Zhang, XiaonanX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Thread-Index: AQHQWhH2lepuzyDLpkePN4Df86sNow== Date: Mon, 9 Mar 2015 02:37:18 +0000 Message-ID: <63FB47D6C0357E428AA804B2C89068BA012ABA67@SHSMSX104.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> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E10D84D79@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: A9bA B+YS DJwI DW9o DZDc Efmf FAPg Ffne FyCK H0Mk IA67 IFX9 IwKL JvEw KYMw KY3I; 1; ZAB0AHMAQABkAHAAZABrAC4AbwByAGcA; Sosha1_v1; 7; {21A27E4C-AB87-40FD-8AA6-E6471266320B}; eABpAGEAbwBuAGEAbgB4AC4AegBoAGEAbgBnAEAAaQBuAHQAZQBsAC4AYwBvAG0A; Mon, 09 Mar 2015 02:43:50 GMT; UgBFADoAIABbAGQAdABzAF0AIABbAFAAQQBUAEMASABdACAAYgB1AGcAIABmAGkAeAA6ACAAZgBpAHgAIABpAHMAcwB1AGUAIAB3AGgAZQBuACAARABUAFMAIAByAHUAbgAgAG8AbgAJAEYAZQBkAG8AcgBhADIAMQAJAGEAbgBkAAkAZgByAGUAZQBiAHMAZAA= x-cr-puzzleid: {21A27E4C-AB87-40FD-8AA6-E6471266320B} 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 02:37:24 -0000 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: Liu, Yong=20 Sent: Thursday, March 05, 2015 3:00 PM To: Liu, Yong; Zhang, XiaonanX; dts@dpdk.org Subject: RE: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and = freebsd Xiaonan, Your issue will be fixed by latest patch below. Can you try it in your envi= ronment? [PATCH] framework/ssh: add session buffer flush before every command > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong > Sent: Saturday, February 28, 2015 4:37 PM > To: Zhang, XiaonanX; dts@dpdk.org > Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 an= d > freebsd >=20 > Hi Xiaonan, > Function send_expect_base is one of the basic functions in DTS > framework. So we should not just move back and work around this issue. > This issue should be investigated and fixed. You can look into it > and help us get to know the root cause of why ret_status is not int. >=20 > Thanks, > Marvin >=20 > > -----Original Message----- > > From: Zhang, XiaonanX > > Sent: Saturday, February 28, 2015 4:27 PM > > To: Zhang, XiaonanX; Liu, Yong; dts@dpdk.org > > Subject: RE: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 > and > > freebsd > > > > Hi Yong, > > When we tested DPDK package, we found a fault, > > In this [dts] [PATCH 4/6] framework/ssh: Add verify ability for > command > > execution 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_status 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 > > freebsd > > > > Some nic like FVL have more than only one interface on Fedora21, DTS > will > > take > > 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/net' % > > (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 > > > > 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/" > > > > - out =3D self.send_expect("ll %s && cd %s" % (dst_dir, p_di= r), > > + out =3D self.send_expect("ls %s && cd %s" % (dst_dir, p_di= r), > > "#", verify=3DTrue) > > if out =3D=3D -1: > > raise ValueError("Directiry %s or %s does not exist," > > -- > > 1.9.3