Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Hangbin Liu
Thu, 05 Nov 2026 02:19
Re: [PATCH net] selftests: bonding: feed link monitor to deflake prio_test
Author: Hangbin Liu
Date: Thu, 05 Nov 2026 02:19
Date: Thu, 05 Nov 2026 02:19
61 lines
10787 bytes
10787 bytes
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
Re: [PATCH net] selftests: bonding: feed link monitor to deflake prio_test
Author: Hangbin Liu
Date: Wed, 11 Nov 2026 00:36
Date: Wed, 11 Nov 2026 00:36
19 lines
9041 bytes
9041 bytes
On Tue, Nov 10, 2026 at 11:53:52AM +0000, Bjoern Doebel wrote: > Hi Hangbin, > > On Thu, Nov 05, 2026 at 10:19:08AM +0800, Hangbin Liu wrote: > > If the kill fails for some reason, will we wait here forever and hang the > > entire test? > > No. bash keeps a terminated child's exit status until it is reaped, so if > the ping already exited the kill fails but the wait returns immediately. > Only a genuinely unkillable ping would block, independent of kill. The > idiomatic form is kill_process() from net/lib.sh, which short-circuits > the wait when the kill fails. Yes, that's what I mean. We need to avoid that the kill failed and the process still running. Thanks Hangbin
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads