diff mbox series

[net] selftests: bonding: Increase timeout to 1200s

Message ID 20240118001233.304759-1-bpoirier@nvidia.com (mailing list archive)
State Accepted
Commit d7309c20ef3a48e1592d95c82039262f64b6e785
Delegated to: Netdev Maintainers
Headers show
Series [net] selftests: bonding: Increase timeout to 1200s | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success SINGLE THREAD; Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 2 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-18--03-00 (tests: 403)

Commit Message

Benjamin Poirier Jan. 18, 2024, 12:12 a.m. UTC
When tests are run by runner.sh, bond_options.sh gets killed before
it can complete:

make -C tools/testing/selftests run_tests TARGETS="drivers/net/bonding"
	[...]
	# timeout set to 120
	# selftests: drivers/net/bonding: bond_options.sh
	# TEST: prio (active-backup miimon primary_reselect 0)                [ OK ]
	# TEST: prio (active-backup miimon primary_reselect 1)                [ OK ]
	# TEST: prio (active-backup miimon primary_reselect 2)                [ OK ]
	# TEST: prio (active-backup arp_ip_target primary_reselect 0)         [ OK ]
	# TEST: prio (active-backup arp_ip_target primary_reselect 1)         [ OK ]
	# TEST: prio (active-backup arp_ip_target primary_reselect 2)         [ OK ]
	#
	not ok 7 selftests: drivers/net/bonding: bond_options.sh # TIMEOUT 120 seconds

This test includes many sleep statements, at least some of which are
related to timers in the operation of the bonding driver itself. Increase
the test timeout to allow the test to complete.

I ran the test in slightly different VMs (including one without HW
virtualization support) and got runtimes of 13m39.760s, 13m31.238s, and
13m2.956s. Use a ~1.5x "safety factor" and set the timeout to 1200s.

Fixes: 42a8d4aaea84 ("selftests: bonding: add bonding prio option test")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20240116104402.1203850a@kernel.org/#t
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
---
 tools/testing/selftests/drivers/net/bonding/settings | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hangbin Liu Jan. 18, 2024, 1:20 a.m. UTC | #1
On Wed, Jan 17, 2024 at 07:12:32PM -0500, Benjamin Poirier wrote:
> When tests are run by runner.sh, bond_options.sh gets killed before
> it can complete:
> 
> make -C tools/testing/selftests run_tests TARGETS="drivers/net/bonding"
> 	[...]
> 	# timeout set to 120
> 	# selftests: drivers/net/bonding: bond_options.sh
> 	# TEST: prio (active-backup miimon primary_reselect 0)                [ OK ]
> 	# TEST: prio (active-backup miimon primary_reselect 1)                [ OK ]
> 	# TEST: prio (active-backup miimon primary_reselect 2)                [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 0)         [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 1)         [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 2)         [ OK ]
> 	#
> 	not ok 7 selftests: drivers/net/bonding: bond_options.sh # TIMEOUT 120 seconds
> 
> This test includes many sleep statements, at least some of which are
> related to timers in the operation of the bonding driver itself. Increase
> the test timeout to allow the test to complete.
> 
> I ran the test in slightly different VMs (including one without HW
> virtualization support) and got runtimes of 13m39.760s, 13m31.238s, and
> 13m2.956s. Use a ~1.5x "safety factor" and set the timeout to 1200s.
> 
> Fixes: 42a8d4aaea84 ("selftests: bonding: add bonding prio option test")
> Reported-by: Jakub Kicinski <kuba@kernel.org>
> Closes: https://lore.kernel.org/netdev/20240116104402.1203850a@kernel.org/#t
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
> ---
>  tools/testing/selftests/drivers/net/bonding/settings | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/bonding/settings b/tools/testing/selftests/drivers/net/bonding/settings
> index 6091b45d226b..79b65bdf05db 100644
> --- a/tools/testing/selftests/drivers/net/bonding/settings
> +++ b/tools/testing/selftests/drivers/net/bonding/settings
> @@ -1 +1 @@
> -timeout=120
> +timeout=1200
> -- 
> 2.43.0
> 

Thanks, I will check how to use busywait in bonding test.

Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
patchwork-bot+netdevbpf@kernel.org Jan. 19, 2024, 2:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 17 Jan 2024 19:12:32 -0500 you wrote:
> When tests are run by runner.sh, bond_options.sh gets killed before
> it can complete:
> 
> make -C tools/testing/selftests run_tests TARGETS="drivers/net/bonding"
> 	[...]
> 	# timeout set to 120
> 	# selftests: drivers/net/bonding: bond_options.sh
> 	# TEST: prio (active-backup miimon primary_reselect 0)                [ OK ]
> 	# TEST: prio (active-backup miimon primary_reselect 1)                [ OK ]
> 	# TEST: prio (active-backup miimon primary_reselect 2)                [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 0)         [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 1)         [ OK ]
> 	# TEST: prio (active-backup arp_ip_target primary_reselect 2)         [ OK ]
> 	#
> 	not ok 7 selftests: drivers/net/bonding: bond_options.sh # TIMEOUT 120 seconds
> 
> [...]

Here is the summary with links:
  - [net] selftests: bonding: Increase timeout to 1200s
    https://git.kernel.org/netdev/net/c/d7309c20ef3a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/drivers/net/bonding/settings b/tools/testing/selftests/drivers/net/bonding/settings
index 6091b45d226b..79b65bdf05db 100644
--- a/tools/testing/selftests/drivers/net/bonding/settings
+++ b/tools/testing/selftests/drivers/net/bonding/settings
@@ -1 +1 @@ 
-timeout=120
+timeout=1200