From nobody Thu May 28 10:45:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gR3653mZzz6fWDf for ; Thu, 28 May 2026 10:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gR365340kz3Dt0 for ; Thu, 28 May 2026 10:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0/Sd9+7U/sVw/famJ6kL1ZeJcpYQXPE3VamsnVUlsg=; b=NV99khiP3FhSuCthghw/tMj0CUduASa7v8auQyTjEcdd54f3vsote7rVrcQ+vgNBn8GuO7 T0NFllvGeEjWCHl/xyL6WsR8gqMedJAooSedNxrZB/Qs8eQFEipLkzl1UqeY7ECoh6GgxM GqqaEsj1lmvEHTYa2PAGdObot+2592/PRt14cMYRttsgzUM+quPSeRWKL7tpzXzPlqKOXd CTjAyLol3eHdHFq8AD/NxRpyz/Qd7TBUbgbDJ/jLiNXSo6gSXCJmlr91hI7JKYvks3MQUA ePnc9e6GcP7zAUMooj6YPy3MBLofOK+D0zU6Y8rFooo6eq7iqWxCpXc1q4ijpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779965101; a=rsa-sha256; cv=none; b=AWPJi0Fh0UECzRprLTzDr91yxjPabGyMy7KTDNe3htfHq8QP8lgbMU3M7RuTdMMFe26ooC XJ3A6U7R6/e+ZXNhy3yGk4c89cbjQFANVhJtTihpXH16C8TK8Rqa+DCQFNuKc4tn6i1q/W 9xefOD1n0OFpT8T2+fq7ESUxZA3CtTg8/LiLEwkajqUbSZmySIYCucMOXgVXOU62ojTtkk TBDXXeUZ8Ei09mAfVkzDthhDr3iQX1XLFqhYPagGu/x6bXOwDsz2Rtm7l9PTk5ewm6e2EE vvZcOpSwFYCeg5cYDQrh80vNhc3Pk6MxDuLsCb9Rg/Nu01JaG6kMRq5qVteMuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0/Sd9+7U/sVw/famJ6kL1ZeJcpYQXPE3VamsnVUlsg=; b=raPuYPkH05rZDsqHuxwl8mItclPUxOVRjnNgmg4X1t2NuoF3QHi6u7pLOis0plpCAJ2xfO Y3BXgNlrMPwLy4eiISOHun2pyj2hsBfZLCLIdbBYOyntfplsB0hUp6Wkg190CqVRLVbphX Hsyybr7hfg3im5eahnrcJIrNZK3U+Z731MkKK2LATpu50OwNTE2ZJAVGoAXP01t5yvIYw9 bb6k0cKvMQ61z1CEb+L5L9E1HHbWzQdEUQsXEaY+ZW2FFcVsBEaMxOda7y6cdh4pmFjPTQ BylfDBc1WTD6bQR4uKVLLaobPVVClAfLS/1AAP/OeRPQfcilbo/YZ3tI1zrOMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR3652JWpzkDD for ; Thu, 28 May 2026 10:45:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ae9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 28 May 2026 10:45:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: ff873565bc2c - main - ping: fix test timestamp_origin when tstamprepl is disabled List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff873565bc2c3e47fe1d070305aa851189ee8bcf Auto-Submitted: auto-generated Date: Thu, 28 May 2026 10:45:01 +0000 Message-Id: <6a181cad.3ae9b.32d308de@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=ff873565bc2c3e47fe1d070305aa851189ee8bcf commit ff873565bc2c3e47fe1d070305aa851189ee8bcf Author: Olivier Cochard AuthorDate: 2026-05-28 10:40:48 +0000 Commit: Olivier Cochard CommitDate: 2026-05-28 10:40:48 +0000 ping: fix test timestamp_origin when tstamprepl is disabled The timestamp_origin test sends an ICMP Timestamp Request (ping -Mt) and parses the tso/tsr fields out of the reply. When the sysctl net.inet.icmp.tstamprepl is 0, the kernel silently drops the request, ping receives no reply, and the sed extraction yields an empty $tso. The test then fails inside atf_check test -n "$tso" with the unhelpful message Approved by: maxim Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57287 --- sbin/ping/tests/ping_test.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh index af700615dc8d..ab45ad809a52 100644 --- a/sbin/ping/tests/ping_test.sh +++ b/sbin/ping/tests/ping_test.sh @@ -253,14 +253,22 @@ inject_reply_cleanup() ifconfig `cat tun.txt` destroy } -atf_test_case timestamp_origin +atf_test_case timestamp_origin cleanup timestamp_origin_head() { atf_set "descr" "ICMP Originate Timestamp" + atf_set "require.user" "root" + atf_set "require.config" "allow_sysctl_side_effects" } timestamp_origin_body() { require_ipv4 + # The kernel only replies to ICMP timestamp requests when + # net.inet.icmp.tstamprepl is enabled. Save the current value + # so the cleanup hook can restore it, then enable replies. + sysctl -n net.inet.icmp.tstamprepl > tstamprepl.txt + sysctl net.inet.icmp.tstamprepl=1 + # Run ping timestamp out=$(ping -Mt -c1 127.0.0.1) @@ -286,6 +294,12 @@ timestamp_origin_body() atf_fail "tso ($tso) differs from tsr ($tsr) by $diff seconds" fi } +timestamp_origin_cleanup() +{ + if [ -f tstamprepl.txt ]; then + sysctl net.inet.icmp.tstamprepl=`cat tstamprepl.txt` + fi +} atf_init_test_cases() {