test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuanx.a.tu@intel.com>
To: dts@dpdk.org
Cc: Gu yongjie <yongjiex.gu@intel.com>
Subject: [dts] [PATCH] fix ieee1588 mismatch error
Date: Mon, 16 Nov 2015 14:59:43 +0800	[thread overview]
Message-ID: <1447657183-9987-1-git-send-email-lijuanx.a.tu@intel.com> (raw)

From: Gu yongjie <yongjiex.gu@intel.com>

DPDK changed the output of timestamp value,
modify dts code to match it.

Signed-off-by: Gu yongjie <yongjiex.gu@intel.com>
---
 tests/TestSuite_ieee1588.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index 723ca40..012d601 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -36,6 +36,7 @@ Test support of IEEE1588 Precise Time Protocol.
 
 import dts
 import time
+import re
 from test_case import TestCase
 from pmd_output import PmdOutput
 
@@ -105,8 +106,15 @@ 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 (\d+)")
-        tx_time = dts.regexp(out, "TX timestamp value (\d+)")
+        pattern_rx = re.compile("RX timestamp value (\d+) s (\d+) ns")
+        pattern_tx = re.compile("TX timestamp value (\d+) s (\d+) ns")
+
+        m_rx = pattern_rx.search(out)
+        m_tx = pattern_tx.search(out)
+        if m_rx is not None:
+            rx_time = m_rx.group(2)
+        if m_tx is not None:
+            tx_time = m_tx.group(2)
 
         self.verify(rx_time is not None, "RX timestamp error ")
         self.verify(tx_time is not None, "TX timestamp error ")
-- 
1.7.4.4

                 reply	other threads:[~2015-11-16  7:04 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=1447657183-9987-1-git-send-email-lijuanx.a.tu@intel.com \
    --to=lijuanx.a.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yongjiex.gu@intel.com \
    /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).