From: Hangbin Liu <hangbin.liu@linux.dev>
To: Bjoern Doebel <doebel@amazon.de>
Cc: Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>, Hangbin Liu <liuhangbin@gmail.com>,
Liang Li <liali@redhat.com>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] selftests: bonding: feed link monitor to deflake prio_test
Date: Thu, 5 Nov 2026 10:19:08 +0800 [thread overview]
Message-ID: <auvnnIXQV2zufxtF@fedora> (raw)
In-Reply-To: <20261104142018.552135-1-doebel@amazon.de>
Hi Bjoern,
On Wed, Nov 04, 2026 at 02:20:18PM +0000, Bjoern Doebel wrote:
> With the bond idle between test steps, the arp/ns link monitor can
> declare a healthy slave down (~300ms without RX/TX). If this hits a
> failover step, the bond picks a different active slave than expected,
> and primary_reselect=failure/better never reverts it:
>
> TEST: prio (active-backup ns_ip6_target primary_reselect 2) [FAIL]
> Current active slave is eth0 but not eth2
Thanks for the fix. I also saw this issue but haven't checked it yet.
>
> Reproducible when running tests under load (2-4 / 100 runs).
>
> Fix by pinging a non-existent neighbor for the duration of the test to
> keep traffic coming. 100 runs under the same load with the patch
> applied: 0 failures.
>
> Fixes: 42a8d4aaea84 ("selftests: bonding: add bonding prio option test")
> Signed-off-by: Bjoern Doebel <doebel@amazon.de>
> ---
> .../selftests/drivers/net/bonding/bond_options.sh | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_options.sh b/tools/testing/selftests/drivers/net/bonding/bond_options.sh
> index 187b478d0ddf2..f599a2a8ef156 100755
> --- a/tools/testing/selftests/drivers/net/bonding/bond_options.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_options.sh
> @@ -74,6 +74,16 @@ prio_test()
>
> # create bond
> bond_reset "${param}"
> +
> + # Keep the arp/ns link monitor fed for the duration of the test:
> + # ping a non-existent neighbor, which generates steady broadcast
> + # ARP requests sourced from the bond's own address. These egress on
> + # the active slave and are flooded onto the backup slaves' links,
> + # where they validate as RX activity. Without traffic, idle slaves
> + # are declared down by the monitor between test steps and the
> + # failover checks below race with the monitor.
> + ip netns exec ${s_ns} ping -i 0.1 -W 1 192.0.2.99 &> /dev/null &
> + local ping_pid=$!
> # set active_slave to primary eth1 specifically
> ip -n ${s_ns} link set bond0 type bond active_slave eth1
>
> @@ -157,6 +167,9 @@ prio_test()
> check_active_slave "eth0"
> bond_check_connection "change slave prio"
> fi
> +
> + kill $ping_pid 2>/dev/null
> + wait $ping_pid 2>/dev/null
If the kill fails for some reason, will we wait here forever and hang the
entire test?
Thanks
Hangbin
next prev parent reply other threads:[~2026-11-05 2:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 14:20 [PATCH net] selftests: bonding: feed link monitor to deflake prio_test Bjoern Doebel
2026-11-05 2:19 ` Hangbin Liu [this message]
2026-11-10 11:53 ` Bjoern Doebel
2026-11-11 0:36 ` Hangbin Liu
2026-11-08 15:12 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auvnnIXQV2zufxtF@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=doebel@amazon.de \
--cc=edumazet@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=liali@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.