Skip to contentSkip to conversation

selftests: vlan_bridge_binding: Fix flaky operational state check

PATCH Applied Ido Schimmel 5 participants 5 messages Jun 17 – Jun 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

Fixes dca12e9ab760 ("selftests: net: Add a VLAN bridge binding selftest")
---
 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
index e8c02c64e03a..d04caa14202d 100755
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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")
---
  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
index e8c02c64e03a..d04caa14202d 100755

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"
  }
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ido Schimmel
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")
maintainer
#3 lore raw
In reply to Ido Schimmel
Quoted 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!!

#4 lore raw
In reply to Ido Schimmel
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