selftests: bonding: reduce garp_test/arp_validate test time
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 5 Feb 2024 13:00:47 +0000 (21:00 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Feb 2024 02:26:20 +0000 (18:26 -0800)
commit45bf79bc56c4158afb6f57cca67ac0ef0a7073ef
tree88e2034ead1194e5bb9fbdbd0a11a87393d10281
parent9150820c88304a9f52452bc18725c88f137688d8
selftests: bonding: reduce garp_test/arp_validate test time

The purpose of grat_arp is testing commit 9949e2efb54e ("bonding: fix
send_peer_notif overflow"). As the send_peer_notif was defined to u8,
to overflow it, we need to

send_peer_notif = num_peer_notif * peer_notif_delay = num_grat_arp * peer_notify_delay / miimon > 255
  (kernel)           (kernel parameter)                   (user parameter)

e.g. 30 (num_grat_arp) * 1000 (peer_notify_delay) / 100 (miimon) > 255.

Which need 30s to complete sending garp messages. To save the testing time,
the only way is reduce the miimon number. Something like
30 (num_grat_arp) * 100 (peer_notify_delay) / 10 (miimon) > 255.

To save more time, the 50 num_grat_arp testing could be removed.

The arp_validate_test also need to check the mii_status, which sleep
too long. Use slowwait to save some time.

For other connection checkings, make sure active slave changed first.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240205130048.282087-4-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/bonding/bond_options.sh