From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1A007234 for ; Sat, 28 Feb 2015 09:37:25 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 28 Feb 2015 00:37:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,666,1418112000"; d="scan'208";a="460602059" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2015 00:21:42 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 28 Feb 2015 16:37:18 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.197]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.161]) with mapi id 14.03.0195.001; Sat, 28 Feb 2015 16:37:17 +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: AQHQUzBN4OEj9TPKmUqSqUVoX/IPZp0Fuy0g Date: Sat, 28 Feb 2015 08:37:16 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D82E91@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> In-Reply-To: <63FB47D6C0357E428AA804B2C89068BA012A9804@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: Sat, 28 Feb 2015 08:37:26 -0000 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. Thanks, Marvin > -----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 an= d > freebsd >=20 > 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, >=20 > 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 > > + >=20 > This function have no ret; > BTW, I suggested we still used expect function, firstly, there are man= y > 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; >=20 > out =3D self.send_expect(command, '# ', 5) > + name =3D out.split('\t')[0] >=20 > Best Regards > Xiaonan >=20 > -----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 an= d > freebsd >=20 >=20 > 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 >=20 > -----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 >=20 > 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. >=20 > Signed-off-by: Marvinliu >=20 > 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 >=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," > -- > 1.9.3