From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id ECC019581 for ; Mon, 16 Nov 2015 08:04:14 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 15 Nov 2015 23:04:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,301,1444719600"; d="scan'208";a="839444217" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by fmsmga001.fm.intel.com with ESMTP; 15 Nov 2015 23:04:13 -0800 From: Lijuan Tu To: dts@dpdk.org Date: Mon, 16 Nov 2015 14:59:43 +0800 Message-Id: <1447657183-9987-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 Cc: Gu yongjie Subject: [dts] [PATCH] fix ieee1588 mismatch error 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, 16 Nov 2015 07:04:15 -0000 From: Gu yongjie DPDK changed the output of timestamp value, modify dts code to match it. Signed-off-by: Gu yongjie --- 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