From nobody Fri Jun 26 15:18:34 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 4gmzpM1b73z6jf1n for ; Fri, 26 Jun 2026 15:18:35 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmzpL5xT8z3lbg for ; Fri, 26 Jun 2026 15:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782487114; 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=ippVXUSs97oPEVtvnMBe7CltTufsz7TWfWXZvtokLIE=; b=bBKOr975PbQE7Ew+udZ/Q3NHq1Zb8ZSgf/jdRqd92yUSvA9OrHIgYB47nFrY4g+gQIkvga AXrGtsPOWe/IOTg2q9GbMFRN85cZLCyte0+lMo/e7wcxqfl9WI9S2ouqWB9YbrsPpNQ7kh YQXShH1kUjx8iQUodxPFZAo4ZHedlgw4HTok00fmP6DhMQ+uhZNfbaC3IED9g5l30OHpIA sNGvWEcdG1SKonkY9ntStVYI32VTHICgsQ2BJV85jKYWGKjAi06NT+HISeuhEUFtMnUCRk iR3TqAapjnPfNFBR/UbKP6KAmtsBZtN2Ba8fH+h0prxUY5aTLIL4wijqbOXd1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782487114; a=rsa-sha256; cv=none; b=cvpgrn9ENH2sZEjm8NhHT8/REQAF27/T/Uyis9HNO1MrjqHxTroxbNI0GHWn/Rkcc5DUK/ zw+xtbJkQs4sv4jIXtR8HA5CuVogsaV4L2B5UvXT3wROsB1EpTqPcB9PoeYNJ49kM8Y1mH ktapNbH5tnRt9dGB50Mwl0JTJ6uk2Llis7BcK29Ppk3c6yaBagIaZy+QEeozInAxMeZyLr RLmkYJJlfkRKFXGryt7VGA7U2u7k6V3wKn6fmZJ0fga46Xr3swimW0OHIjr6aFo6g7H+Jc yWpCkbWfVJdD9XTdZLf8ev1dVKMqkOY/IDrBn9ml+0UF3/rbBWZl5DekW6/xPw== 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=1782487114; 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=ippVXUSs97oPEVtvnMBe7CltTufsz7TWfWXZvtokLIE=; b=EpLCaKLiB+mSW4uKz6aH9OWoQeRcRH/bdpeYlMvF20G2U7DgzqqmziB9uDpcrlZv6PP8GP xX3p6b7M77EeugxJpl0TjBpxI0ORKYzXgsSdU9a8nIksZ6aK6cu8if0jzKgl2wB2K1ne7z qv7rVqtrtYKiU7jqwMXUfCT/skp+ndXa2HZQmHlBC5DQLH+Vn2sVZYTJW39BKWBVnSQxCt cwAfYva0/KLm7oSnGk+o3RvMO9Je8zadw1sJECftfxnX1j8vVyr6FTKXjD9Pq7yUIa8xWU U4SYxkiqEG88c35Fs42Nahye9QjN3sr1qZrc06h7gtneNWh6ipWqTrBmtc2fmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gmzpL4xnRzjJq for ; Fri, 26 Jun 2026 15:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 230a8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 15:18:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: a13936fcdc8d - stable/15 - tests/pf/route_to: check_random: rely on test timeout to fail 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: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a13936fcdc8dc3f37125614daa424a9cf1ae380d Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 15:18:34 +0000 Message-Id: <6a3e984a.230a8.237ed139@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=a13936fcdc8dc3f37125614daa424a9cf1ae380d commit a13936fcdc8dc3f37125614daa424a9cf1ae380d Author: Siva Mahadevan AuthorDate: 2026-06-17 16:52:00 +0000 Commit: Siva Mahadevan CommitDate: 2026-06-26 15:16:43 +0000 tests/pf/route_to: check_random: rely on test timeout to fail This test is known to be flaky if 10 attempts happens to be not enough for the test to pass. Usually, this test passes in ~4-6 attempts. See https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28664/testReport/junit/sys.netpfil.pf/route_to/random_table/ Rely on the timeout (default 5 mins) to catch a failure here, rather than just 10 attempts. It's very unlikely that 5 mins worth of attempts still isn't enough. For a history of flakiness, see https://ci.freebsd.org/job/FreeBSD-main-amd64-test/lastSuccessfulBuild/testReport/junit/sys.netpfil.pf/route_to/random_table/history/ PR: 289477 Reviewed by: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57408 (cherry picked from commit 1294f332aec02e111b47d69e0d91e32dc2624001) --- tests/sys/netpfil/pf/route_to.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index 13b60c8f80bc..99387aa3802d 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -29,10 +29,10 @@ common_dir=$(atf_get_srcdir)/../common # We need to somehow test if the random algorithm of pf_map_addr() is working. -# The table or prefix contains multiple IP next-hop addresses, for each one try -# to establish up to 10 connections. Fail the test if with this many attempts -# the "good" target has not been chosen. However this choice is random, -# the check might still ocasionally fail. +# The table or prefix contains multiple IP next-hop addresses. For each one, +# repeatedly try to establish connections until the "good" target has been chosen. +# However, since this choice is random, the test might still ocasionally fail +# due to timeout. check_random() { if [ "$1" = "IPv4" ]; then ping_from="${net_clients_4}.1" @@ -47,8 +47,9 @@ check_random() { port=42000 states=$(mktemp) || exit 1 for good_target in $good_targets; do - found="no" - for attempt in $(seq 1 10); do + # Loop until either the "good" target has been chosen + # or the test times out. + while :; do port=$(( port + 1 )) jexec router pfctl -Fs atf_check -s exit:0 ${common_dir}/pft_ping.py \ @@ -65,13 +66,9 @@ check_random() { done fi; if grep -qE "route-to: ${good_target}@" $states; then - found=yes break fi done - if [ "${found}" = "no" ]; then - atf_fail "Target ${good_target} not selected after ${attempt} attempts!" - fi done } @@ -1354,8 +1351,7 @@ prefer_ipv6_nexthop_mixed_af_roundrobin_ipv6_body() # The "random" flag will pick random hosts from the table but will # not dive into prefixes, always choosing the 0th address. # Proper address family will be choosen. The choice being random makes - # testing it non-trivial. We do 10 attempts to have each target chosen. - # Hopefully this is enough to have this test pass often enough. + # testing it non-trivial. # pf_map_addr() starts iterating over hosts of the pool from the 2nd # host. This behaviour was here before adding prefer-ipv6-nexthop