From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6796D5A5D for ; Mon, 13 Jul 2015 09:40:00 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 13 Jul 2015 00:39:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,461,1432623600"; d="scan'208";a="605069573" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2015 00:39:58 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6D7duTm031122; Mon, 13 Jul 2015 15:39:56 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6D7drVY007266; Mon, 13 Jul 2015 15:39:55 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6D7drli007262; Mon, 13 Jul 2015 15:39:53 +0800 From: "huilongx,xu" To: dts@dpdk.org Date: Mon, 13 Jul 2015 15:39:50 +0800 Message-Id: <1436773190-7224-2-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1436773190-7224-1-git-send-email-huilongx.xu@intel.com> References: <1436773190-7224-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [dts 2/2] fix ieee1588 enable case failed for fortville and niantic NIC 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, 13 Jul 2015 07:40:01 -0000 From: huilong xu Signed-off-by: huilong xu --- 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 # [>] 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