* [PATCH net] selftests: bonding: feed link monitor to deflake prio_test
@ 2026-11-04 14:20 Bjoern Doebel
0 siblings, 0 replies; only message in thread
From: Bjoern Doebel @ 2026-11-04 14:20 UTC (permalink / raw)
To: Jay Vosburgh, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Shuah Khan
Cc: Hangbin Liu, Liang Li, netdev, linux-kselftest, linux-kernel,
Bjoern Doebel
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
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
}
prio_miimon()
base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
--
2.50.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-04 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 14:20 [PATCH net] selftests: bonding: feed link monitor to deflake prio_test Bjoern Doebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®