Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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")
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250604012055.891431-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+1 -1
+1 -1
tools/testing/selftests/drivers/net/hw/tso.py
··· 39 39 port = rand_port() 40 40 listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof" 41 41 42 - with bkg(listen_cmd, host=cfg.remote) as nc: 42 + with bkg(listen_cmd, host=cfg.remote, exit_wait=True) as nc: 43 43 wait_port_listen(port, host=cfg.remote) 44 44 45 45 if ipver == "4":