From nobody Thu May 28 10:45:01 2026 X-Original-To: dev-commits-src-all@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 4gR36B5rC1z6fWDm for ; Thu, 28 May 2026 10:45:06 +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 4gR36B5HZSz3Dpd for ; Thu, 28 May 2026 10:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779965106; 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=itVONrjwXpdUuUJfx3n1fxfZhDNyOgbp4WJgbzNvjFgVgCPUBnF5/83uJ6Ztm1pIL+nLWZ LcTLY7Hrkockb9r+25qjZMQ0VfJlkRwYaX1c6fyg4VJ4tX/1fbHsLc+BkbsoCSAZCeiOPl IAFkLRfZh5LY+EbaPMKmJ3c7q9JxkoTfwHkO7RGhMVF3/ep+/akW2gajAPikk+qX+6Is4G fPS7sp+FZkGLMBJ3Y0cmTUTrLmkEpKRSwxcCMN00S7+be9ZcNKgx/rgOCu9fM3glvVnHdE Q8IWdPSI0vqlsmbFxWR537yRMLX5LyIbqwiGGpNlmAIigB3Ve1Mz047XDBRbcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779965106; a=rsa-sha256; cv=none; b=fS/b32Xh68KGh2Sx4KpjqE8txYYcZFnSzTjTNDXi5DCfqULva9Gpt8oSzbRSOz3syU0bXu RSc7ZchxHD9WSkHvWrAdoeH1Z2b9EU9S/8qlR+L8czQDjZNZnND/VvlxxLEDHmMQBHxMhP 55KshPmFyGV++1WKRefre+1yQr6D/mxio/nxSGzH05QMxrX/a3Ugf5rARnhXAWgs8ugUuM 6uTUj3YoQaNkCIgQyCnHdHYNFEfKp80HuYlky7Xh+242uDcQ2nhgfOjSPcvBsyuZTbJaUi OOSIllsMM1owWOetsdzk2+np43OQy02hxwB7PxmYXETgITWuXwH0nZE3yrI9ZA== 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=1779965106; 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=uZXcUod0t6fQwUepSZ40gvFpwMqUVEVIVFPcAVxjg3476J5BVGBxl4IeGirmFhr6IWTldr WC/6xaXeYZ3ym1G997Z4+RYTLH/4+I5wUEi5htIJghKGL8JbI/1OynMWIHu7ismEhNQv+W Qz2xIlh0KBQDFKyRgAHzw+0Eykr90BRIcBAuIhMiGAsO6ygfs/EjEftuumm7EFHsCbhZnu 0pOCNxswWhS0HoIIZpMSasb1pJdL0z+2b0z3hHP/0Kd+WsC7QL/9W6srZiPTNEC7LxmPpj PnfCsBKmcAbdXMQE8il5QxR01uHFiqRPquqMR3CQ3awFVv4LhInVM2jAFQ7SzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gR36B4MDhzk0k for ; Thu, 28 May 2026 10:45:06 +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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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() {