test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [patch V1] fix ifconfig and ping test case in kni test suite
@ 2017-01-09  8:09 xu,huilong
  2017-01-11  7:58 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,huilong @ 2017-01-09  8:09 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

chang list:
1. set virtual interface down, before test ifconfig up function, because sometime the virtual interface stats is up, when creat it.
2. remove ipv6 address check, when virtual interface create. because different os, ipv6 default not enable. should add ipv6 address by slef.
3. remove ping virtual interface by self. some os not support this test, eg RHEL.

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_kni.py | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 00f1e25..0825903 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -469,17 +469,14 @@ class TestKni(TestCase):
         for port in self.config['ports']:
             virtual_interface = self.virtual_interface_name(port)
 
-            # Set up
+            # some time, the virtual interface stats is up when it create
+            # so should set down before set up.
+            self.dut.send_expect(
+                "ifconfig %s down" % virtual_interface, "# ")
             out = self.dut.send_expect(
                 "ifconfig %s up" % virtual_interface, "# ")
             self.verify("Configure network interface of %d up" %
                         port in out, "ifconfig up not supported")
-
-            out = self.dut.send_expect(
-                "ip -family inet6 address show dev %s" % virtual_interface, "# ")
-            self.verify(
-                "inet6 " in out, "ifconfig up the port_virtual_interaces not support")
-
             # Add an IPv6 address
             out = self.dut.send_expect(
                 "ifconfig %s add fe80::%d" % (virtual_interface, port + 1), "# ")
@@ -549,11 +546,6 @@ class TestKni(TestCase):
             virtual_interface = self.virtual_interface_name(port)
 
             out = self.dut.send_expect(
-                "ping -w 2 -I %s 192.168.%d.1" % (virtual_interface, port), "# ", 10)
-            self.verify("64 bytes from 192.168.%d.1:" %
-                        port in out, "ping not supported")
-
-            out = self.dut.send_expect(
                 "ping -w 2 -I %s 192.168.%d.2" % (virtual_interface, port), "# ", 10)
             self.verify("64 bytes from 192.168.%d.2:" %
                         port in out, "ping not supported")
-- 
1.9.3

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

* Re: [dts] [patch V1] fix ifconfig and ping test case in kni test suite
  2017-01-09  8:09 [dts] [patch V1] fix ifconfig and ping test case in kni test suite xu,huilong
@ 2017-01-11  7:58 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2017-01-11  7:58 UTC (permalink / raw)
  To: xu,huilong, dts

Thanks, applied.

On 01/09/2017 04:09 PM, xu,huilong wrote:
> chang list:
> 1. set virtual interface down, before test ifconfig up function, because sometime the virtual interface stats is up, when creat it.
> 2. remove ipv6 address check, when virtual interface create. because different os, ipv6 default not enable. should add ipv6 address by slef.
> 3. remove ping virtual interface by self. some os not support this test, eg RHEL.
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
>   tests/TestSuite_kni.py | 16 ++++------------
>   1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
> index 00f1e25..0825903 100644
> --- a/tests/TestSuite_kni.py
> +++ b/tests/TestSuite_kni.py
> @@ -469,17 +469,14 @@ class TestKni(TestCase):
>           for port in self.config['ports']:
>               virtual_interface = self.virtual_interface_name(port)
>   
> -            # Set up
> +            # some time, the virtual interface stats is up when it create
> +            # so should set down before set up.
> +            self.dut.send_expect(
> +                "ifconfig %s down" % virtual_interface, "# ")
>               out = self.dut.send_expect(
>                   "ifconfig %s up" % virtual_interface, "# ")
>               self.verify("Configure network interface of %d up" %
>                           port in out, "ifconfig up not supported")
> -
> -            out = self.dut.send_expect(
> -                "ip -family inet6 address show dev %s" % virtual_interface, "# ")
> -            self.verify(
> -                "inet6 " in out, "ifconfig up the port_virtual_interaces not support")
> -
>               # Add an IPv6 address
>               out = self.dut.send_expect(
>                   "ifconfig %s add fe80::%d" % (virtual_interface, port + 1), "# ")
> @@ -549,11 +546,6 @@ class TestKni(TestCase):
>               virtual_interface = self.virtual_interface_name(port)
>   
>               out = self.dut.send_expect(
> -                "ping -w 2 -I %s 192.168.%d.1" % (virtual_interface, port), "# ", 10)
> -            self.verify("64 bytes from 192.168.%d.1:" %
> -                        port in out, "ping not supported")
> -
> -            out = self.dut.send_expect(
>                   "ping -w 2 -I %s 192.168.%d.2" % (virtual_interface, port), "# ", 10)
>               self.verify("64 bytes from 192.168.%d.2:" %
>                           port in out, "ping not supported")

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

end of thread, other threads:[~2017-01-11  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09  8:09 [dts] [patch V1] fix ifconfig and ping test case in kni test suite xu,huilong
2017-01-11  7:58 ` Liu, Yong

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