From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id B6664374C for ; Mon, 7 Aug 2017 05:25:14 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1C1D580D; Sun, 6 Aug 2017 20:25:14 -0700 (PDT) Received: from localhost.localdomain.com (unknown [10.169.40.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 559BA3F483; Sun, 6 Aug 2017 20:25:13 -0700 (PDT) From: Herbert Guan To: dts@dpdk.org, yong.liu@intel.com Cc: jianbo.liu@linaro.org, Herbert Guan Date: Mon, 7 Aug 2017 11:25:01 +0800 Message-Id: <1502076301-1391-1-git-send-email-herbert.guan@arm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1501831094-31107-1-git-send-email-herbert.guan@arm.com> References: <1501831094-31107-1-git-send-email-herbert.guan@arm.com> Subject: [dts] [PATCH v2] tests/short_live: fixes the result parsing issue X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2017 03:25:15 -0000 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 --- 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