From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2874B5A83 for ; Thu, 5 Mar 2015 08:00:01 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 04 Mar 2015 23:00:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,345,1422950400"; d="scan'208";a="462785587" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by FMSMGA003.fm.intel.com with ESMTP; 04 Mar 2015 22:53:40 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 5 Mar 2015 14:59:58 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.197]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.46]) with mapi id 14.03.0195.001; Thu, 5 Mar 2015 14:59:57 +0800 From: "Liu, Yong" To: "Liu, Yong" , "Zhang, XiaonanX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Thread-Index: AQHQUzHPTcJmqt7aAUCTVWnGHbukup0NfDdQ Date: Thu, 5 Mar 2015 06:59:56 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D84D79@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> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E10D82E91@SHSMSX103.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: Thu, 05 Mar 2015 07:00:01 -0000 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