test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests/short_live: fixes the result parsing issue
@ 2017-08-04  7:18 Herbert Guan
  2017-08-07  3:25 ` [dts] [PATCH v2] " Herbert Guan
  2017-08-07 11:58 ` [dts] [PATCH] " Liu, Yong
  0 siblings, 2 replies; 5+ messages in thread
From: Herbert Guan @ 2017-08-04  7:18 UTC (permalink / raw)
  To: dts, jianbo.liu; +Cc: Herbert Guan

Fixes below issues:
1) corrected the scapy reslut parsing string
2) ensure link up for testpmd and l3fwd
3) pkill for l2fwd and l3fwd need to wait a while for process quit

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
---
 tests/TestSuite_short_live.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index 72745a9..27c6f6a 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -103,7 +103,7 @@ class TestShortLiveApp(TestCase):
             count = 2
 
         self.tester.scapy_append('p=sniff(iface="%s",count=%d,timeout=5)' % (rxitf, count))
-        self.tester.scapy_append('RESULT=str(p)')
+        self.tester.scapy_append('RESULT=str(p[%d].show)' % (count-1))
 
         self.tester.scapy_foreground()
 
@@ -125,7 +125,7 @@ class TestShortLiveApp(TestCase):
         Basic rx/tx forwarding test
         """
         #dpdk start
-        self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+        self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "Link Up", 120)
         self.dut.send_expect("set fwd mac", "testpmd>")
         self.dut.send_expect("set promisc all off", "testpmd>")
         self.dut.send_expect("start", "testpmd>")
@@ -150,7 +150,7 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print "clean_up_with_signal_testpmd round %d" % (i + 1)
-            self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+            self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "Link Up", 120)
             self.dut.send_expect("set fwd mac", "testpmd>")
             self.dut.send_expect("set promisc all off", "testpmd>")
             self.dut.send_expect("start", "testpmd>")
@@ -174,8 +174,10 @@ class TestShortLiveApp(TestCase):
             # kill with differen Signal
             if i%2 == 0:
                 self.dut.send_expect("pkill -2 l2fwd", "#", 60, True)
+                time.sleep(2)
             else:
                 self.dut.send_expect("pkill -15 l2fwd", "#", 60, True)
+                time.sleep(2)
 
     def test_clean_up_with_signal_l3fwd(self):
         repeat_time = 5
@@ -183,14 +185,16 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print "clean_up_with_signal_l3fwd round %d" % (i + 1)
-            self.dut.send_expect("./examples/l3fwd/build/app/l3fwd -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &", "L3FWD:", 120)
+            self.dut.send_expect("./examples/l3fwd/build/app/l3fwd -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &", "L3FWD: entering main loop", 120)
             self.check_forwarding([0, 0], self.nic)
 
             # kill with differen Signal
             if i%2 == 0:
                 self.dut.send_expect("pkill -2 l3fwd", "#", 60, True)
+                time.sleep(2)
             else:
                 self.dut.send_expect("pkill -15 l3fwd", "#", 60, True)
+                time.sleep(2)
 
     def tear_down(self):
         """
-- 
1.8.3.1

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

* [dts] [PATCH v2] tests/short_live: fixes the result parsing issue
  2017-08-04  7:18 [dts] [PATCH] tests/short_live: fixes the result parsing issue Herbert Guan
@ 2017-08-07  3:25 ` Herbert Guan
  2017-08-07 12:22   ` Liu, Yong
  2017-08-07 11:58 ` [dts] [PATCH] " Liu, Yong
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Guan @ 2017-08-07  3:25 UTC (permalink / raw)
  To: dts, yong.liu; +Cc: jianbo.liu, Herbert Guan

Fixes below issues:
1) corrected the scapy reslut parsing string
2) ensure link up for testpmd and l3fwd
3) pkill for l2fwd and l3fwd need to wait a while for process quit

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
---
 tests/TestSuite_short_live.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index 72745a9..61e99c8 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -103,7 +103,7 @@ class TestShortLiveApp(TestCase):
             count = 2
 
         self.tester.scapy_append('p=sniff(iface="%s",count=%d,timeout=5)' % (rxitf, count))
-        self.tester.scapy_append('RESULT=str(p)')
+        self.tester.scapy_append('RESULT=str(p[%d].show)' % (count-1))
 
         self.tester.scapy_foreground()
 
@@ -125,7 +125,7 @@ class TestShortLiveApp(TestCase):
         Basic rx/tx forwarding test
         """
         #dpdk start
-        self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+        self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "LSC event", 120)
         self.dut.send_expect("set fwd mac", "testpmd>")
         self.dut.send_expect("set promisc all off", "testpmd>")
         self.dut.send_expect("start", "testpmd>")
@@ -150,7 +150,7 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print "clean_up_with_signal_testpmd round %d" % (i + 1)
-            self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+            self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "LSC event", 120)
             self.dut.send_expect("set fwd mac", "testpmd>")
             self.dut.send_expect("set promisc all off", "testpmd>")
             self.dut.send_expect("start", "testpmd>")
@@ -174,8 +174,10 @@ class TestShortLiveApp(TestCase):
             # kill with differen Signal
             if i%2 == 0:
                 self.dut.send_expect("pkill -2 l2fwd", "#", 60, True)
+                time.sleep(2)
             else:
                 self.dut.send_expect("pkill -15 l2fwd", "#", 60, True)
+                time.sleep(2)
 
     def test_clean_up_with_signal_l3fwd(self):
         repeat_time = 5
@@ -183,14 +185,16 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print "clean_up_with_signal_l3fwd round %d" % (i + 1)
-            self.dut.send_expect("./examples/l3fwd/build/app/l3fwd -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &", "L3FWD:", 120)
+            self.dut.send_expect("./examples/l3fwd/build/app/l3fwd -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &", "L3FWD: entering main loop", 120)
             self.check_forwarding([0, 0], self.nic)
 
             # kill with differen Signal
             if i%2 == 0:
                 self.dut.send_expect("pkill -2 l3fwd", "#", 60, True)
+                time.sleep(2)
             else:
                 self.dut.send_expect("pkill -15 l3fwd", "#", 60, True)
+                time.sleep(2)
 
     def tear_down(self):
         """
-- 
1.8.3.1

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

* Re: [dts] [PATCH] tests/short_live: fixes the result parsing issue
  2017-08-07 11:58 ` [dts] [PATCH] " Liu, Yong
@ 2017-08-07  3:31   ` Herbert Guan
  0 siblings, 0 replies; 5+ messages in thread
From: Herbert Guan @ 2017-08-07  3:31 UTC (permalink / raw)
  To: Liu, Yong, dts, jianbo.liu

Marvin,

Thanks for review.  V2 patch has been submitted just now with one comments:

>> 3) pkill for l2fwd and l3fwd need to wait a while for process quit
>L2fwd and L3fwd will do the same actions after received SIGINT or SIGTERM signal. There's no need to change the signal type.
The signal type logic is not changed in this patch.  While both l2fwd and l3fwd need some time to clean up after they received the signal.  The for loop shall wait about 2 seconds before starting another process of l2fwd/l3fwd.  So "time.sleep(2)" were added after sending pkill.

Thanks,
Herbert

-----Original Message-----
From: Liu, Yong [mailto:yong.liu@intel.com]
Sent: Monday, August 7, 2017 19:59
To: Herbert Guan <Herbert.Guan@arm.com>; dts@dpdk.org; jianbo.liu@linaro.org
Subject: Re: [dts] [PATCH] tests/short_live: fixes the result parsing issue

Thanks Herbert. Some comments below.

On 08/04/2017 03:18 PM, Herbert Guan wrote:
> Fixes below issues:
> 1) corrected the scapy reslut parsing string
> 2) ensure link up for testpmd and l3fwd
Suggest to waiting for LSC event or just wait some seconds for link status updated.

> 3) pkill for l2fwd and l3fwd need to wait a while for process quit
L2fwd and L3fwd will do the same actions after received SIGINT or SIGTERM signal. There's no need to change the signal type.

> Signed-off-by: Herbert Guan<herbert.guan@arm.com>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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

* Re: [dts] [PATCH] tests/short_live: fixes the result parsing issue
  2017-08-04  7:18 [dts] [PATCH] tests/short_live: fixes the result parsing issue Herbert Guan
  2017-08-07  3:25 ` [dts] [PATCH v2] " Herbert Guan
@ 2017-08-07 11:58 ` Liu, Yong
  2017-08-07  3:31   ` Herbert Guan
  1 sibling, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2017-08-07 11:58 UTC (permalink / raw)
  To: Herbert Guan, dts, jianbo.liu

Thanks Herbert. Some comments below.

On 08/04/2017 03:18 PM, Herbert Guan wrote:
> Fixes below issues:
> 1) corrected the scapy reslut parsing string
> 2) ensure link up for testpmd and l3fwd
Suggest to waiting for LSC event or just wait some seconds for link 
status updated.

> 3) pkill for l2fwd and l3fwd need to wait a while for process quit
L2fwd and L3fwd will do the same actions after received SIGINT or 
SIGTERM signal. There's no need to change the signal type.

> Signed-off-by: Herbert Guan<herbert.guan@arm.com>

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

* Re: [dts] [PATCH v2] tests/short_live: fixes the result parsing issue
  2017-08-07  3:25 ` [dts] [PATCH v2] " Herbert Guan
@ 2017-08-07 12:22   ` Liu, Yong
  0 siblings, 0 replies; 5+ messages in thread
From: Liu, Yong @ 2017-08-07 12:22 UTC (permalink / raw)
  To: Herbert Guan, dts; +Cc: jianbo.liu

Thanks, Herbert. Applied.

On 08/07/2017 11:25 AM, Herbert Guan wrote:
> Fixes below issues:
> 1) corrected the scapy reslut parsing string
> 2) ensure link up for testpmd and l3fwd
> 3) pkill for l2fwd and l3fwd need to wait a while for process quit
>
> Signed-off-by: Herbert Guan<herbert.guan@arm.com>
> ---
>   tests/TestSuite_short_live.py | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)

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

end of thread, other threads:[~2017-08-07  3:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-04  7:18 [dts] [PATCH] tests/short_live: fixes the result parsing issue Herbert Guan
2017-08-07  3:25 ` [dts] [PATCH v2] " Herbert Guan
2017-08-07 12:22   ` Liu, Yong
2017-08-07 11:58 ` [dts] [PATCH] " Liu, Yong
2017-08-07  3:31   ` Herbert Guan

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