test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jingguo Fu <jingguox.fu@intel.com>
To: dts@dpdk.org
Cc: Jingguo Fu <jingguox.fu@intel.com>
Subject: [dts] [DTS][PATCH] update ieee1588 suite according to dpdk code
Date: Wed,  8 Jul 2015 11:01:06 +0800	[thread overview]
Message-ID: <1436324466-4904-1-git-send-email-jingguox.fu@intel.com> (raw)

Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
 tests/TestSuite_ieee1588.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index 6ee95e4..177fe9f 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -70,11 +70,11 @@ class TestIeee1588(TestCase):
         """
         IEEE1588 Enable test case.
         """
-        self.dut.send_expect("set fwd ieee1588", "testpmd> ")
+        self.dut.send_expect("set fwd ieee1588", "testpmd> ", 20)
         # Waiting for 'testpmd> ' Fails due to log messages, "Received non PTP packet", in the output
-        self.dut.send_expect("start", ">", 5)  
+        self.dut.send_expect("start", ">", 10)  
         # Allow the output from the "start" command to finish before looking for a regexp in expect
-        time.sleep(1)
+        time.sleep(5)
 
         # use the first port on that self.nic
         dutPorts = self.dut.get_ports()
@@ -88,23 +88,24 @@ class TestIeee1588(TestCase):
         # this is the output of sniff
         # [<Ether  dst=01:1b:19:00:00:00 src=00:00:00:00:00:00 type=0x88f7 |<Raw  load='\x00\x02' |>>]
         self.tester.scapy_foreground()
+        time.sleep(5)
         self.tester.scapy_append('nutmac="01:1b:19:00:00:00"')
         self.tester.scapy_append('sendp([Ether(dst=nutmac,type=0x88f7)/"\\x00\\x02"], iface="%s")' % itf)
-        self.tester.scapy_append('time.sleep(1)')
-
+        self.tester.scapy_append('time.sleep(5)')
         self.tester.scapy_execute()
+        time.sleep(5)
         out = self.tester.scapy_get_result()
+        time.sleep(5)
         self.verify("0x88f7" in out, "Ether type is not PTP")
         # self.verify("\\x00\\x02" in out, "Payload wrong in PTP")
 
-        time.sleep(1)
-        out = self.dut.send_expect("stop", "testpmd> ")
-
+        time.sleep(5)
+        out = self.dut.send_expect("stop", "testpmd> ", 30)
         text = dts.regexp(out, "(.*) by hardware")
         self.verify("IEEE1588 PTP V2 SYNC" in text, "Not filtered " + text)
 
-        rx_time = dts.regexp(out, "RX timestamp value (0x[0-9a-fA-F]+)")
-        tx_time = dts.regexp(out, "TX timestamp value (0x[0-9a-fA-F]+)")
+        rx_time = dts.regexp(out, "RX timestamp value ([0-9a-fA-F]+)")
+        tx_time = dts.regexp(out, "TX timestamp value ([0-9a-fA-F]+)")
 
         self.verify(rx_time is not None, "RX timestamp error ")
         self.verify(tx_time is not None, "TX timestamp error ")
-- 
1.9.3

                 reply	other threads:[~2015-07-08  3:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1436324466-4904-1-git-send-email-jingguox.fu@intel.com \
    --to=jingguox.fu@intel.com \
    --cc=dts@dpdk.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).