selftests: vlan_bridge_binding: Fix flaky operational state check
Subsystems (3)
PATCH 1/1 selftests: vlan_bridge_binding: Fix flaky operational state check
check_operstate() busy waits for up to one second for the operational state to change to the expected state. This is not enough since carrier loss events can be delayed by the kernel for up to one second (see __linkwatch_run_queue()), leading to sporadic failures.
Fix by increasing the busy wait period to two seconds.
--- tools/testing/selftests/net/vlan_bridge_binding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/vlan_bridge_binding.sh +1 -1
@@ -64,7 +64,7 @@ check_operstate() local expect=$1; shift local operstate - operstate=$(busywait 1000 \ + operstate=$(busywait 2000 \ operstate_is "$dev" "$expect") check_err $? "Got operstate of $operstate, expected $expect" }
Signature · 1 line
2.54.0
Quoted 20 lines · Ido Schimmel
check_operstate()busy waits for up to one second for the operational state to change to the expected state. This is not enough since carrier loss events can be delayed by the kernel for up to one second (see__linkwatch_run_queue()), leading to sporadic failures.Fix by increasing the busy wait period to two seconds.
Fixes dca12e9ab760 ("selftests: net: Add a VLAN bridge binding selftest")Reported-by Jakub Kicinski <[email protected]>Signed-off-by Ido Schimmel <[email protected]>--- tools/testing/selftests/net/vlan_bridge_binding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/net/vlan_bridge_binding.sh +0
-0
tools/testing/selftests/net/vlan_bridge_binding.sh check_operstate() · line 70
Quoted 8 lines
tools/testing/selftests/net/vlan_bridge_binding.sh +1
-1@@ -64,7 +64,7 @@ check_operstate() local expect=$1; shift local operstate - operstate=$(busywait 1000 \ + operstate=$(busywait 2000 \ operstate_is "$dev" "$expect") check_err $? "Got operstate of $operstate, expected $expect" }
Quoted 11 lines · Ido Schimmel
check_operstate()busy waits for up to one second for the operational state to change to the expected state. This is not enough since carrier loss events can be delayed by the kernel for up to one second (see__linkwatch_run_queue()), leading to sporadic failures.Fix by increasing the busy wait period to two seconds.
Fixes dca12e9ab760 ("selftests: net: Add a VLAN bridge binding selftest")Reported-by Jakub Kicinski <[email protected]>Signed-off-by Ido Schimmel <[email protected]>
Jakub Kicinski
maintainerQuoted 6 lines · On Wed, 17 Jun 2026 13:43:23 +0300 Ido Schimmel wrote:
check_operstate()busy waits for up to one second for the operational state to change to the expected state. This is not enough since carrier loss events can be delayed by the kernel for up to one second (see__linkwatch_run_queue()), leading to sporadic failures.Fix by increasing the busy wait period to two seconds.
Thanks!!
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 17 Jun 2026 13:43:23 +0300 you wrote:
check_operstate()busy waits for up to one second for the operational state to change to the expected state. This is not enough since carrier loss events can be delayed by the kernel for up to one second (see__linkwatch_run_queue()), leading to sporadic failures.Fix by increasing the busy wait period to two seconds.
[...]
Here is the summary with links:
- [net] selftests: vlan_bridge_binding: Fix flaky operational state check
https://git.kernel.org/netdev/net/c/4045f1c3d68e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html