From nobody Thu Oct 22 00:45:44 2026 X-Original-To: dev-commits-src-branches@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 4j96rn3vHrz6wqjP for ; Thu, 22 Oct 2026 00:45:45 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j96rn1Cqyz3M7d for ; Thu, 22 Oct 2026 00:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792629945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JE6GhFZnKyZGjLAKNz9OD8syX5LlqBfZakh5RpqTTP4=; b=AQHNrBmHhMg0sOjb4GqR1DilWTIk8pnY6saMD/+OvL/bXlKgWm5TXyJPNNoAtiKNW/N9GV RjND2/EYeKP5jeRr8/jbwSLKaXNpEVNDIPn1LXQJcpnivycAl2+nTFy901sa8VVPeyCVvL roALANvOr3wTJELTNSWiovr2fRkzBTQvyWZXuxTv2EQdIx1Ig1A7Y1RrEmmRA3cfLToq1C qww3arLn0Ed0Mze1WMQuwDbaEHRbLQvL9MCQH54QJyFEBRzO3zkcHXiHTFxaz4DLbUoqdt cuaBSw3b07Qp1mSB36cl2WbK7mOH752KqQCgONWVIaHQYmssdcxv+KLSqcL66w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792629945; b=xM6mlDzXUKXRoFb9U+UuDayhXaLX4gjqQa//tIGccJsGEL9TR4A64Mrmk+QPx7FpUFcLUW lEd2wuxN8+JCzqByx4w9HhWnOZm6tumuSb4h4L650lowV3nWxV4R+t+u7cpuo5oKSCG/WJ JS/IDku544sidAqzsMC21Vpv+nz8kO6luaeCgq514OkRttPpbOYl/r+CETNEyjqposqg5d to8e6qC+h8rOcu4R57z/k25XkWIlFQaJBDAvNAvWEYYbXdrtT+7yXgKNCsOPALjrciN3rA UoJXPm7WU0KnWpAsMZnflbXF+8K1B57IRIquY+3oFf03edj72uysdBfycnrsQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792629945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JE6GhFZnKyZGjLAKNz9OD8syX5LlqBfZakh5RpqTTP4=; b=L5/ObyV8OJLvs4MkWvOHiNrDd8C+IwpNyRTu1SYu2sutEvJCDD2gJAnDmukpOMcCLUh+Di sAGeKYaCnWY+w9hpW1OYHz2Z8VgYKUPirUCLDBZAfO9P+DNan10ukt5JtHYx57Hpr3g7Dy sYLL5MewNwL+fn+OlehuOzqbqH+hx3MKIFlmH1/sf0AXRJ/8jbucNoQ71GTmWwfBXjzFNH PTk52skuQKP/9cy17TjZNhc4SFwfK89eIuQWnh5ZmR4pO2oavjsdtgU5L7sbR5C/6ep06w nwTuouaTjhhrRHgj7AcJSxcqalC0+PE02N/g3blEuIyreOB0I51poKoteYpxlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j96rm6bs6zHTT for ; Thu, 22 Oct 2026 00:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ee62 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 22 Oct 2026 00:45:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Olivier Cochard From: Maxim Konovalov Subject: git: 49f56f3a6cff - stable/15 - ping: fix test timestamp_origin when tstamprepl is disabled List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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: maxim X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 49f56f3a6cff1366f950fb0e46309a89bf41c2bb Auto-Submitted: auto-generated Date: Thu, 22 Oct 2026 00:45:44 +0000 Message-Id: <6ad95cb8.3ee62.3f5c2124@gitrepo.freebsd.org> The branch stable/15 has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=49f56f3a6cff1366f950fb0e46309a89bf41c2bb commit 49f56f3a6cff1366f950fb0e46309a89bf41c2bb Author: Olivier Cochard AuthorDate: 2026-05-28 10:40:48 +0000 Commit: Maxim Konovalov CommitDate: 2026-10-22 00:41:37 +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 (cherry picked from commit ff873565bc2c3e47fe1d070305aa851189ee8bcf) --- 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() {