test suite reviews and discussions
 help / color / mirror / Atom feed
From: "huilongx,xu" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [dts 2/2] fix ieee1588 enable case failed for fortville and niantic NIC
Date: Mon, 13 Jul 2015 15:39:50 +0800	[thread overview]
Message-ID: <1436773190-7224-2-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1436773190-7224-1-git-send-email-huilongx.xu@intel.com>

From: huilong xu <huilongx.xu@intel.com>


Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
 tests/TestSuite_ieee1588.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index 6ee95e4..e23f8fb 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -70,14 +70,15 @@ class TestIeee1588(TestCase):
         """
         IEEE1588 Enable test case.
         """
-        self.dut.send_expect("set fwd ieee1588", "testpmd> ")
+        self.dut.send_expect("set fwd ieee1588", "testpmd> ", 10)
         # 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)
 
         # use the first port on that self.nic
         dutPorts = self.dut.get_ports()
+        mac =  self.dut.get_mac_address(dutPorts[0])
         port = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(port)
 
@@ -88,7 +89,7 @@ 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()
-        self.tester.scapy_append('nutmac="01:1b:19:00:00:00"')
+        self.tester.scapy_append('nutmac="%s"' % mac)
         self.tester.scapy_append('sendp([Ether(dst=nutmac,type=0x88f7)/"\\x00\\x02"], iface="%s")' % itf)
         self.tester.scapy_append('time.sleep(1)')
 
@@ -102,9 +103,9 @@ class TestIeee1588(TestCase):
 
         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 (\d+)")
+        tx_time = dts.regexp(out, "TX timestamp value (\d+)")
 
         self.verify(rx_time is not None, "RX timestamp error ")
         self.verify(tx_time is not None, "TX timestamp error ")
@@ -114,11 +115,12 @@ class TestIeee1588(TestCase):
         """
         IEEE1588 Disable test case.
         """
-        self.dut.send_expect("stop", "testpmd> ")
+        self.dut.send_expect("stop", "testpmd> ", 10)
         time.sleep(3)
 
         # use the first port on that self.nic
         dutPorts = self.dut.get_ports()
+        mac =  self.dut.get_mac_address(dutPorts[0])
         port = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(port)
 
@@ -127,7 +129,7 @@ class TestIeee1588(TestCase):
         self.tester.scapy_append('RESULT = p[1].summary()')
 
         self.tester.scapy_foreground()
-        self.tester.scapy_append('nutmac="01:1b:19:00:00:00"')
+        self.tester.scapy_append('nutmac="%s"' % mac)
         self.tester.scapy_append('sendp([Ether(dst=nutmac,type=0x88f7)/"\\x00\\x02"], iface="%s")' % itf)
 
         self.tester.scapy_execute()
-- 
1.7.4.4

  reply	other threads:[~2015-07-13  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  7:39 [dts] [dts 1/2] add ieee1588 test suite for fortville NIC huilongx,xu
2015-07-13  7:39 ` huilongx,xu [this message]
2015-07-13  8:00 ` Liu, Yong

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=1436773190-7224-2-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@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).