Skip to contentSkip to conversation

selftests: drv-net: tso: make bkg() wait for socat to quit

PATCH Applied Jakub Kicinski 3 participants 3 messages Jun 4, 2025 – Jun 5, 2025

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 selftests: drv-net: tso: make bkg() wait for socat to quit

Commit 846742f7e32f ("selftests: drv-net: add a warning for bkg + shell + terminate") added a warning for bkg() used with terminate=True. The tso test was missed as we didn't have it running anywhere in NIPA. Add exit_wait=True, to avoid:

# Warning: combining shell and terminate is risky!
# SIGTERM may not reach the child on zsh/ksh!

getting printed twice for every variant.

Fixes 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test")

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 tools/testing/selftests/drivers/net/hw/tso.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/hw/tso.py +1 -1
index e1ecb92f79d9..150d6db241a0 100755
@@ -39,7 +39,7 @@ from lib.py import bkg, cmd, defer, ethtool, ip, rand_port, wait_port_listen
     port = rand_port()
     listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof"
 
-    with bkg(listen_cmd, host=cfg.remote) as nc:
+    with bkg(listen_cmd, host=cfg.remote, exit_wait=True) as nc:
         wait_port_listen(port, host=cfg.remote)
 
         if ipver == "4":
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jakub Kicinski

Commit 846742f7e32f ("selftests: drv-net: add a warning for bkg + shell + terminate") added a warning for bkg() used with terminate=True. The tso test was missed as we didn't have it running anywhere in NIPA. Add exit_wait=True, to avoid:

Quoted 7 lines

# Warning: combining shell and terminate is risky!
# SIGTERM may not reach the child on zsh/ksh!

getting printed twice for every variant.

Fixes 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test")
#2 lore raw
In reply to Jakub Kicinski
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 9 lines · On Tue, 3 Jun 2025 18:20:55 -0700 you wrote:

Commit 846742f7e32f ("selftests: drv-net: add a warning for bkg + shell + terminate") added a warning for bkg() used with terminate=True. The tso test was missed as we didn't have it running anywhere in NIPA. Add exit_wait=True, to avoid:

# Warning: combining shell and terminate is risky!
# SIGTERM may not reach the child on zsh/ksh!

[...]

Here is the summary with links:
- [net] selftests: drv-net: tso: make bkg() wait for socat to quit

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

You are awesome, thank you!

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