test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Zhang, XiaonanX" <xiaonanx.zhang@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and	freebsd
Date: Sat, 28 Feb 2015 03:22:08 +0000	[thread overview]
Message-ID: <63FB47D6C0357E428AA804B2C89068BA012A978B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1425020951-29498-1-git-send-email-yong.liu@intel.com>


Acked-by: Xiaonan Zhang <xiaonanx.zhang@intel.com>
- 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 <yong.liu@intel.com>

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 = 'ls --color=never /sys/bus/pci/devices/0000:%s:%s/net' % (bus_id, devfun_id)
-        return self.send_expect(command, '# ')
+        out = self.send_expect(command, '# ', verify=True)
+        if out == -1:
+            name = ""
+        else:
+            name = 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 = "/tmp/"
 
-            out = self.send_expect("ll %s && cd %s" % (dst_dir, p_dir),
+            out = self.send_expect("ls %s && cd %s" % (dst_dir, p_dir),
                                    "#", verify=True)
             if out == -1:
                 raise ValueError("Directiry %s or %s does not exist,"
-- 
1.9.3

  reply	other threads:[~2015-02-28  3:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27  7:09 Yong Liu
2015-02-28  3:22 ` Zhang, XiaonanX [this message]
2015-02-28  8:26   ` Zhang, XiaonanX
2015-02-28  8:37     ` Liu, Yong
2015-03-05  6:59       ` Liu, Yong
2015-03-09  2:37         ` Zhang, XiaonanX
2015-03-09  8:22           ` Liu, Yong
2015-03-02  4:50     ` Qiu, Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63FB47D6C0357E428AA804B2C89068BA012A978B@SHSMSX104.ccr.corp.intel.com \
    --to=xiaonanx.zhang@intel.com \
    --cc=dts@dpdk.org \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).