test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V2] tests/kni:del the ip before verify results
  2019-08-16 11:52 [dts] [PATCH V2] tests/kni:del the ip before verify results Wenjie Li
@ 2019-08-16  2:59 ` Li, WenjieX A
  2019-08-28 10:45 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Li, WenjieX A @ 2019-08-16  2:59 UTC (permalink / raw)
  To: dts; +Cc: Li, WenjieX A

Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>

> -----Original Message-----
> From: Li, WenjieX A
> Sent: Friday, August 16, 2019 7:53 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V2] tests/kni:del the ip before verify results
> 
> Remove the ip from tester before verify results; otehrwise, if the case is fail, the
> ip is still existing on tester.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> 
> V2: delete the dupicate "ip addr del..."
> 
>  tests/TestSuite_kni.py | 24 ++++++++++--------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index
> f1f85df..0fa5113 100644
> --- a/tests/TestSuite_kni.py
> +++ b/tests/TestSuite_kni.py
> @@ -579,20 +579,19 @@ class TestKni(TestCase):
> 
>              virtual_interface = self.virtual_interface_name(port)
> 
> -            out = self.dut.send_expect(
> +            out1 = 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")
> -
> -            out = self.tester.send_expect(
> +            out2 = self.tester.send_expect(
>                  "ping -w 1 -I %s 192.168.%d.1" % (tx_interface, port), "# ", 10)
> -            self.verify("64 bytes from 192.168.%d.1:" %
> -                        port in out, "kni cannot reply ping packet")
> -
> -            out = self.dut.send_expect(
> +            out3 = self.dut.send_expect(
>                  "ping -w 1 -I %s 192.168.%d.123" % (virtual_interface, port), "# ", 10)
> -            self.verify(
> -                "0 received, 100% packet loss" in out, "ping not supported")
> +
> +            # remove ip from tester
> +            self.tester.send_expect("ip addr del 192.168.%d.2 dev %s" %
> + (port, tx_interface), "# ")
> +
> +            self.verify("64 bytes from 192.168.%d.2:" %port in out1, "ping not
> supported")
> +            self.verify("64 bytes from 192.168.%d.1:" %port in out2, "kni cannot
> reply ping packet")
> +            self.verify("0 received, 100% packet loss" in out3, "ping
> + not supported")
> 
>              out = self.dut.send_expect(
>                  "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'| cut -
> d'/' -f1" % virtual_interface, "# ", 10) @@ -622,9 +621,6 @@ class
> TestKni(TestCase):
>                                         (virtual_interface, ''.join(ipv6list)), "# ", 10)
>              self.verify(
>                  "0 received, 100% packet loss" in out, "ping6 not supported")
> -            # remove ip from tester
> -            self.tester.send_expect(
> -                 "ip addr del 192.168.%d.2 dev %s" % (port, tx_interface), "# ")
> 
>          for port in self.config['ports']:
>              tx_port = self.tester.get_local_port(port)
> --
> 2.17.1


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

* [dts] [PATCH V2] tests/kni:del the ip before verify results
@ 2019-08-16 11:52 Wenjie Li
  2019-08-16  2:59 ` Li, WenjieX A
  2019-08-28 10:45 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Wenjie Li @ 2019-08-16 11:52 UTC (permalink / raw)
  To: dts; +Cc: Wenjie Li

Remove the ip from tester before verify results; otehrwise, if the case is fail, the ip is still existing on tester.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---

V2: delete the dupicate "ip addr del..."

 tests/TestSuite_kni.py | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index f1f85df..0fa5113 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -579,20 +579,19 @@ class TestKni(TestCase):
 
             virtual_interface = self.virtual_interface_name(port)
 
-            out = self.dut.send_expect(
+            out1 = 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")
-
-            out = self.tester.send_expect(
+            out2 = self.tester.send_expect(
                 "ping -w 1 -I %s 192.168.%d.1" % (tx_interface, port), "# ", 10)
-            self.verify("64 bytes from 192.168.%d.1:" %
-                        port in out, "kni cannot reply ping packet")
-
-            out = self.dut.send_expect(
+            out3 = self.dut.send_expect(
                 "ping -w 1 -I %s 192.168.%d.123" % (virtual_interface, port), "# ", 10)
-            self.verify(
-                "0 received, 100% packet loss" in out, "ping not supported")
+
+            # remove ip from tester
+            self.tester.send_expect("ip addr del 192.168.%d.2 dev %s" % (port, tx_interface), "# ")
+
+            self.verify("64 bytes from 192.168.%d.2:" %port in out1, "ping not supported")
+            self.verify("64 bytes from 192.168.%d.1:" %port in out2, "kni cannot reply ping packet")
+            self.verify("0 received, 100% packet loss" in out3, "ping not supported")
 
             out = self.dut.send_expect(
                 "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'| cut -d'/' -f1" % virtual_interface, "# ", 10)
@@ -622,9 +621,6 @@ class TestKni(TestCase):
                                        (virtual_interface, ''.join(ipv6list)), "# ", 10)
             self.verify(
                 "0 received, 100% packet loss" in out, "ping6 not supported")
-            # remove ip from tester
-            self.tester.send_expect(
-                 "ip addr del 192.168.%d.2 dev %s" % (port, tx_interface), "# ")
 
         for port in self.config['ports']:
             tx_port = self.tester.get_local_port(port)
-- 
2.17.1


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

* Re: [dts] [PATCH V2] tests/kni:del the ip before verify results
  2019-08-16 11:52 [dts] [PATCH V2] tests/kni:del the ip before verify results Wenjie Li
  2019-08-16  2:59 ` Li, WenjieX A
@ 2019-08-28 10:45 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-08-28 10:45 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Friday, August 16, 2019 7:53 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V2] tests/kni:del the ip before verify results
> 
> Remove the ip from tester before verify results; otehrwise, if the case is fail,
> the ip is still existing on tester.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> 
> V2: delete the dupicate "ip addr del..."
> 
>  tests/TestSuite_kni.py | 24 ++++++++++--------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index
> f1f85df..0fa5113 100644
> --- a/tests/TestSuite_kni.py
> +++ b/tests/TestSuite_kni.py
> @@ -579,20 +579,19 @@ class TestKni(TestCase):
> 
>              virtual_interface = self.virtual_interface_name(port)
> 
> -            out = self.dut.send_expect(
> +            out1 = 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")
> -
> -            out = self.tester.send_expect(
> +            out2 = self.tester.send_expect(
>                  "ping -w 1 -I %s 192.168.%d.1" % (tx_interface, port), "# ", 10)
> -            self.verify("64 bytes from 192.168.%d.1:" %
> -                        port in out, "kni cannot reply ping packet")
> -
> -            out = self.dut.send_expect(
> +            out3 = self.dut.send_expect(
>                  "ping -w 1 -I %s 192.168.%d.123" % (virtual_interface, port), "# ", 10)
> -            self.verify(
> -                "0 received, 100% packet loss" in out, "ping not supported")
> +
> +            # remove ip from tester
> +            self.tester.send_expect("ip addr del 192.168.%d.2 dev %s" %
> + (port, tx_interface), "# ")
> +
> +            self.verify("64 bytes from 192.168.%d.2:" %port in out1, "ping not
> supported")
> +            self.verify("64 bytes from 192.168.%d.1:" %port in out2, "kni cannot
> reply ping packet")
> +            self.verify("0 received, 100% packet loss" in out3, "ping
> + not supported")
> 
>              out = self.dut.send_expect(
>                  "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'|
> cut -d'/' -f1" % virtual_interface, "# ", 10) @@ -622,9 +621,6 @@ class
> TestKni(TestCase):
>                                         (virtual_interface, ''.join(ipv6list)), "# ", 10)
>              self.verify(
>                  "0 received, 100% packet loss" in out, "ping6 not supported")
> -            # remove ip from tester
> -            self.tester.send_expect(
> -                 "ip addr del 192.168.%d.2 dev %s" % (port, tx_interface), "# ")
> 
>          for port in self.config['ports']:
>              tx_port = self.tester.get_local_port(port)
> --
> 2.17.1


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

end of thread, other threads:[~2019-08-28 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 11:52 [dts] [PATCH V2] tests/kni:del the ip before verify results Wenjie Li
2019-08-16  2:59 ` Li, WenjieX A
2019-08-28 10:45 ` Tu, Lijuan

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