Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 May 2026 23:09:22 +0000
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 667dd9eafa4d - main - tests/ping: Fix date(1) invocations
Message-ID:  <69f7d5a2.22d59.2af19599@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=667dd9eafa4d5352efdfcdc1a9e228c23fbc60f5

commit 667dd9eafa4d5352efdfcdc1a9e228c23fbc60f5
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-05-03 19:05:55 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-05-03 21:51:50 +0000

    tests/ping: Fix date(1) invocations
    
    Fixes:  069681afd58a ("ping: use CLOCK_REALTIME for ICMP Originate Timestamp")
---
 sbin/ping/tests/ping_test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh
index 6e090cfd945a..af700615dc8d 100644
--- a/sbin/ping/tests/ping_test.sh
+++ b/sbin/ping/tests/ping_test.sh
@@ -272,8 +272,8 @@ timestamp_origin_body()
 	atf_check test -n "$tsr"
 
 	# Convert tso and tsr from HH:MM:SS to seconds
-	tso_s=`date -jf %H:%M:%S $tso`
-	tsr_s=`date -jf %H:%M:%S $tsr`
+	tso_s=`date -jf %H:%M:%S $tso +%s`
+	tsr_s=`date -jf %H:%M:%S $tsr +%s`
 
 	diff=$((tso_s - tsr_s))
 	# Tolerate negative time difference between the sender and receiver


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f7d5a2.22d59.2af19599>