test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
@ 2015-02-27  7:09 Yong Liu
  2015-02-28  3:22 ` Zhang, XiaonanX
  0 siblings, 1 reply; 8+ messages in thread
From: Yong Liu @ 2015-02-27  7:09 UTC (permalink / raw)
  To: dts

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-02-27  7:09 [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Yong Liu
@ 2015-02-28  3:22 ` Zhang, XiaonanX
  2015-02-28  8:26   ` Zhang, XiaonanX
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, XiaonanX @ 2015-02-28  3:22 UTC (permalink / raw)
  To: Liu, Yong, dts


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-02-28  3:22 ` Zhang, XiaonanX
@ 2015-02-28  8:26   ` Zhang, XiaonanX
  2015-02-28  8:37     ` Liu, Yong
  2015-03-02  4:50     ` Qiu, Michael
  0 siblings, 2 replies; 8+ messages in thread
From: Zhang, XiaonanX @ 2015-02-28  8:26 UTC (permalink / raw)
  To: Zhang, XiaonanX, Liu, Yong, dts

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=15, verify=False):
> +        ret = self.send_expect_base(command, expected, timeout)
> +        if verify:
> +            ret_status = 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 =  self.send_expect(command, '# ', 5)
 +  name = 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 <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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-02-28  8:26   ` Zhang, XiaonanX
@ 2015-02-28  8:37     ` Liu, Yong
  2015-03-05  6:59       ` Liu, Yong
  2015-03-02  4:50     ` Qiu, Michael
  1 sibling, 1 reply; 8+ messages in thread
From: Liu, Yong @ 2015-02-28  8:37 UTC (permalink / raw)
  To: Zhang, XiaonanX, dts

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 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=15, verify=False):
> > +        ret = self.send_expect_base(command, expected, timeout)
> > +        if verify:
> > +            ret_status = 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 =  self.send_expect(command, '# ', 5)
>  +  name = 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 <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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-02-28  8:26   ` Zhang, XiaonanX
  2015-02-28  8:37     ` Liu, Yong
@ 2015-03-02  4:50     ` Qiu, Michael
  1 sibling, 0 replies; 8+ messages in thread
From: Qiu, Michael @ 2015-03-02  4:50 UTC (permalink / raw)
  To: Zhang, XiaonanX, Liu, Yong, dts

On 2/28/2015 4:27 PM, Zhang, XiaonanX wrote:
> 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=15, verify=False):
>> +        ret = self.send_expect_base(command, expected, timeout)
>> +        if verify:
>> +            ret_status = self.send_expect_base("echo $?", expected)
>> +            if not int(ret_status):
>> +                return ret
>> +            else:
>> +                return -1
>> +        else:
>> +            return ret
>> +
>    This function have no ret;

Hi, Xiaonan

Why no ret? I haven't got your point.


Thanks,
Michael
>    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 =  self.send_expect(command, '# ', 5)
>  +  name = 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 <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,"


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-02-28  8:37     ` Liu, Yong
@ 2015-03-05  6:59       ` Liu, Yong
  2015-03-09  2:37         ` Zhang, XiaonanX
  0 siblings, 1 reply; 8+ messages in thread
From: Liu, Yong @ 2015-03-05  6:59 UTC (permalink / raw)
  To: Liu, Yong, Zhang, XiaonanX, dts

Xiaonan,
Your issue will be fixed by latest patch below. Can you try it in your environment?

[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 and
> freebsd
> 
> 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
> 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=15, verify=False):
> > > +        ret = self.send_expect_base(command, expected, timeout)
> > > +        if verify:
> > > +            ret_status = 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 =  self.send_expect(command, '# ', 5)
> >  +  name = 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 <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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-03-05  6:59       ` Liu, Yong
@ 2015-03-09  2:37         ` Zhang, XiaonanX
  2015-03-09  8:22           ` Liu, Yong
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, XiaonanX @ 2015-03-09  2:37 UTC (permalink / raw)
  To: Liu, Yong, dts

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: Liu, Yong 
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 environment?

[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 and
> freebsd
> 
> 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
> 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=15, verify=False):
> > > +        ret = self.send_expect_base(command, expected, timeout)
> > > +        if verify:
> > > +            ret_status = 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 =  self.send_expect(command, '# ', 5)
> >  +  name = 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 <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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd
  2015-03-09  2:37         ` Zhang, XiaonanX
@ 2015-03-09  8:22           ` Liu, Yong
  0 siblings, 0 replies; 8+ messages in thread
From: Liu, Yong @ 2015-03-09  8:22 UTC (permalink / raw)
  To: Zhang, XiaonanX, dts

Thanks, applied.
> 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: Liu, Yong 
> 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 environment?
>
> [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 and
>> freebsd
>>
>> 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
>> 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=15, verify=False):
>>>> +        ret = self.send_expect_base(command, expected, timeout)
>>>> +        if verify:
>>>> +            ret_status = 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 =  self.send_expect(command, '# ', 5)
>>>  +  name = 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 <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
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-09  8:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27  7:09 [dts] [PATCH] bug fix: fix issue when DTS run on Fedora21 and freebsd Yong Liu
2015-02-28  3:22 ` Zhang, XiaonanX
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

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).