Skip to contentSkip to conversation

selftests: netconsole: Increase port listening timeout

PATCH Applied Pin-yen Lin 3 participants 3 messages Feb 10 – Feb 13

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

PATCH 1/1 selftests: netconsole: Increase port listening timeout

wait_for_port() can wait up to 2 seconds with the sleep and the polling in wait_local_port_listen() combined. So, in netcons_basic.sh, the socat process could die before the test writes to the netconsole.

Increase the timeout to 3 seconds to make netcons_basic.sh pass consistently.

Fixes 3dc6c76391cb ("selftests: net: Add IPv6 support to netconsole basic tests")

---

 tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh +2 -2
index ae8abff4be40..64d3941576d5 100644
@@ -247,8 +247,8 @@ function listen_port_and_save_to() {
 		SOCAT_MODE="UDP6-LISTEN"
 	fi
 
-	# Just wait for 2 seconds
-	timeout 2 ip netns exec "${NAMESPACE}" \
+	# Just wait for 3 seconds
+	timeout 3 ip netns exec "${NAMESPACE}" \
 		socat "${SOCAT_MODE}":"${PORT}",fork "${OUTPUT}" 2> /dev/null
 }
 
Signature · 4 lines
2.53.0.273.g2a3d683680-goog

base-commit: 6d2f142b1e4b203387a92519d9d2e34752a79dbb
branch: net-upstream
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Pin-yen Lin

wait_for_port() can wait up to 2 seconds with the sleep and the polling in wait_local_port_listen() combined. So, in netcons_basic.sh, the socat process could die before the test writes to the netconsole.

Increase the timeout to 3 seconds to make netcons_basic.sh pass consistently.

Fixes 3dc6c76391cb ("selftests: net: Add IPv6 support to netconsole basic tests")
#2 lore raw
In reply to Pin-yen Lin
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 Mon, 9 Feb 2026 16:59:36 -0800 you wrote:

wait_for_port() can wait up to 2 seconds with the sleep and the polling in wait_local_port_listen() combined. So, in netcons_basic.sh, the socat process could die before the test writes to the netconsole.

Increase the timeout to 3 seconds to make netcons_basic.sh pass consistently.

[...]

Here is the summary with links:
- [net] selftests: netconsole: Increase port listening timeout

    https://git.kernel.org/netdev/net/c/a68a9bd086c2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html