From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 79CCF5A5E for ; Wed, 8 Jul 2015 05:01:14 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 07 Jul 2015 20:01:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,428,1432623600"; d="scan'208";a="742616526" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 07 Jul 2015 20:01:12 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6831ACV030574; Wed, 8 Jul 2015 11:01:10 +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 t68318WL004938; Wed, 8 Jul 2015 11:01:10 +0800 Received: (from jingguox@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t68318T3004934; Wed, 8 Jul 2015 11:01:08 +0800 From: Jingguo Fu To: dts@dpdk.org Date: Wed, 8 Jul 2015 11:01:06 +0800 Message-Id: <1436324466-4904-1-git-send-email-jingguox.fu@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Jingguo Fu Subject: [dts] [DTS][PATCH] update ieee1588 suite according to dpdk code 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: Wed, 08 Jul 2015 03:01:14 -0000 Signed-off-by: Jingguo Fu --- 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 # [>] 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