git: 0a9e5c679ff0 - stable/15 - tests/ping: Fix date(1) invocations

From: Maxim Konovalov <maxim_at_FreeBSD.org>
Date: Thu, 22 Oct 2026 00:45:43 UTC
The branch stable/15 has been updated by maxim:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a9e5c679ff0c0efd4c259f6649720ae6d3db870

commit 0a9e5c679ff0c0efd4c259f6649720ae6d3db870
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-05-03 19:05:55 +0000
Commit:     Maxim Konovalov <maxim@FreeBSD.org>
CommitDate: 2026-10-22 00:41:37 +0000

    tests/ping: Fix date(1) invocations
    
    Fixes:  069681afd58a ("ping: use CLOCK_REALTIME for ICMP Originate Timestamp")
    (cherry picked from commit 667dd9eafa4d5352efdfcdc1a9e228c23fbc60f5)
---
 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