From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46037A31F3 for ; Sat, 19 Oct 2019 17:53:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CA581BF71; Sat, 19 Oct 2019 17:53:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 097BA1BF5C for ; Sat, 19 Oct 2019 17:53:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9JFok4T028629 for ; Sat, 19 Oct 2019 08:53:40 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=f/rfFJZeaXzmh/kg4nJddYo7cps551V4vsXmhh6ZpXs=; b=vQ1nXyCiIo0Mm+h1ExoD+Gjk+7ptGTEJstLp6ok0ML9NfrbSi8GLJrJqJvtuGpKTjURv 9PTeXFRCAo1NRrneRaRoup2TTCHj+bV/d348/ns5K7EdfYjjZrSczjdd/9oJV0IjXzDn k3ifHuQHnknUXh27UfBFvEdJPFLzhVbnRMPHuxRm3O+PNGRpMyaTayKcEpvaNEJWerDK o+b0oeKoT77XGrkg7pa7XvVpKIkN7vIv2KSQKPozLt+tYTd9qKxqzwVpZTdOU4hIY2S4 OpOhlro7FZ/EfJTuYuC0Hlz+3fc+D0dK1eJs0gFGFUFcIwCQokXPtgjPVT/EvUshT1bu kA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2vr20mggtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 19 Oct 2019 08:53:40 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 19 Oct 2019 08:53:38 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sat, 19 Oct 2019 08:53:39 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id 953633F703F; Sat, 19 Oct 2019 08:53:37 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Sat, 19 Oct 2019 21:23:28 +0530 Message-ID: <1571500408-29095-1-git-send-email-pvukkisala@marvell.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-19_03:2019-10-18,2019-10-19 signatures=0 Subject: [dts] [PATCH] ptpclient: don't use software time stamping for cavm devices 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Phanendra Vukkisala Aslo fix random failure occurs due to timing Signed-off-by: Phanendra Vukkisala --- tests/TestSuite_ptpclient.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py index 23590e4..461abf1 100644 --- a/tests/TestSuite_ptpclient.py +++ b/tests/TestSuite_ptpclient.py @@ -98,7 +98,10 @@ class TestPtpClient(TestCase): ptp client test case. """ # use the first port on that self.nic - self.tester.send_expect("ptp4l -i %s -2 -m -S &" % self.itf0, "ptp4l") + if self.nic in ["cavium_a063", "cavium_a064"]: + self.tester.send_expect("ptp4l -i %s -2 -m &" % self.itf0, "ptp4l") + else: + self.tester.send_expect("ptp4l -i %s -2 -m -S &" % self.itf0, "ptp4l") # run ptpclient on the background self.dut.send_expect("./examples/ptpclient/build/ptpclient -c f -n 3 -- -T 0 -p 0x1 " + "&", "Delta between master and slave", 60) @@ -125,7 +128,10 @@ class TestPtpClient(TestCase): d_time = self.dut.send_expect("date '+%Y-%m-%d %H:%M'","# ") self.verify(d_time == '2000-01-01 00:00', "set the time error") - self.tester.send_expect("ptp4l -i %s -2 -m -S &" % self.itf0, "ptp4l") + if self.nic in ["cavium_a063", "cavium_a064"]: + self.tester.send_expect("ptp4l -i %s -2 -m &" % self.itf0, "ptp4l") + else: + self.tester.send_expect("ptp4l -i %s -2 -m -S &" % self.itf0, "ptp4l") # run ptpclient on the background self.dut.send_expect("./examples/ptpclient/build/ptpclient -c f -n 3 -- -T 1 -p 0x1" + "&", "Delta between master and slave", 60) @@ -152,6 +158,10 @@ class TestPtpClient(TestCase): # the output will include kill process info, at that time need get system time again. if len(dut_out) != len(tester_out): dut_out = self.dut.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ") + ## In rare cases minute may change while getting time. So get time again + if dut_out != tester_out: + tester_out = self.tester.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ") + dut_out = self.dut.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ") self.verify(tester_out == dut_out, "the DUT time synchronous error") -- 1.7.9.5