From nobody Wed Jun 17 16:53:23 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 4ggVL10y7Xz6h8Zq for ; Wed, 17 Jun 2026 16:53:29 +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 4ggVL100b3z3T5l for ; Wed, 17 Jun 2026 16:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781715209; 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=pg0AQcigK/d9sINDJE5Wwx9Y/+FHL0uF7gMgbSD21IE=; b=As7klP2fd1SbyMZ3CRwlOIVa0n14GooM+gRInHeJsJS11YJso3a5TDA51LRe5ov38fgrBF tyqZEdc3yv+Qfi4HzUFbzMr3RfNtRFs7Wps709Pgm9RKYAzU+HLJOiaidoXRn0nCCwf2i9 IzDIjbqabH+VL7Ild2PYViFXvhnIkgmTNGqAWGSjUThXjwLKAAHOw1uQQIUjSmso0IHnOs qAIoDIdT8RUf+CysEko/keSLMNt/zUNcjC6hArdcFDzBKaeHwx5YTAQFvdGfwu2I3Dtx1I 9DUPwrfr+MsVrOebgFWKjZCe774gcNhVTfSfRR93qXHGSKL0OOBGfKdKgwEW+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781715209; a=rsa-sha256; cv=none; b=HBriPKPq3w6EXrlUg/KPVvrGA/SdDVbFROfS+2G3iStGxLmnncVIeetzukAkMN0X2GeDc+ YLeMybhvrlcnJ2sNdwY/mHNjjKZ9He49sn0/RznSKjL0vsm3aW/btXY5+6RL30SdHiHsSy tWaYqdtDiaYFIEg+fZIUM13hwT+g37ov7ElGxvhpvmUukcVi1EMHRi/0pRnCa5IKQdQxH4 hQmkTUxTUgUS03vyjbFgdTtaMARhEh7BFHs6owT5GDMc6BXlsevj3zG+3KB6PAdX5tF++R PADUYStzyRDdxRpLR0Gx9Cct42ncRjDR6ztqEZnCzn1JMpSivzU+ky/06Mg7mw== 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=1781715209; 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=pg0AQcigK/d9sINDJE5Wwx9Y/+FHL0uF7gMgbSD21IE=; b=oGxWrCdAvWbp8RG/oByJplIwgt4uSwY+cRqjDSsZ+KdxnMjAP9f/gb4HjcB3qgqiW6PKom X9LSrrHFVg7gdvkBgiUNYgg5t7YWddZI4XqYxjllvRO1FU+JgnMeiQRMuLl88EX1ssqlHN hQyLDIXAgstbIJjJuQh9/Kv5Ja1ydK7pHFPMUSwS9YHx8EC8UGjDuEdbN1ml4Bo2v90np/ OWorAZkllYMxwDlhGlcIw6hlL/eQG4cWiIrzeaeMjgvTO0qQt0J8jMk/iQcVSmPq1rWKNm pfm217nJV+hIP6480FyIn8v9gebKL4SvvBsN+gOpYgba+8/1lnrHBhmsJpG8uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ggVL06fMyz4Tt for ; Wed, 17 Jun 2026 16:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19a1d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Jun 2026 16:53:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Siva Mahadevan Subject: git: 1294f332aec0 - main - tests/pf/route_to: check_random: rely on test timeout to fail 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: siva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1294f332aec02e111b47d69e0d91e32dc2624001 Auto-Submitted: auto-generated Date: Wed, 17 Jun 2026 16:53:23 +0000 Message-Id: <6a32d103.19a1d.3b02302a@gitrepo.freebsd.org> The branch main has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=1294f332aec02e111b47d69e0d91e32dc2624001 commit 1294f332aec02e111b47d69e0d91e32dc2624001 Author: Siva Mahadevan AuthorDate: 2026-06-17 16:52:00 +0000 Commit: Siva Mahadevan CommitDate: 2026-06-17 16:53:14 +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 --- 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 7bf4b11788d8..1caf2367a9e3 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 } @@ -1428,8 +1425,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