From: Herbert Guan <herbert.guan@arm.com>
To: dts@dpdk.org, jianbo.liu@linaro.org
Cc: Herbert Guan <herbert.guan@arm.com>
Subject: [dts] [PATCH] tests/short_live: fixes the result parsing issue
Date: Fri, 4 Aug 2017 15:18:14 +0800 [thread overview]
Message-ID: <1501831094-31107-1-git-send-email-herbert.guan@arm.com> (raw)
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
next reply other threads:[~2017-08-04 7:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 7:18 Herbert Guan [this message]
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
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=1501831094-31107-1-git-send-email-herbert.guan@arm.com \
--to=herbert.guan@arm.com \
--cc=dts@dpdk.org \
--cc=jianbo.liu@linaro.org \
/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).