]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: net: terminate bkg() commands on exception
authorJakub Kicinski <kuba@kernel.org>
Mon, 11 Aug 2025 23:13:33 +0000 (16:13 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Aug 2025 01:27:42 +0000 (18:27 -0700)
commit6e9a12f85a7567bb9a41d5230468886bd6a27b20
treebdab1b185978074407a537fc5ab59dac7c0b48f1
parent424e96de30230aac2061f941961be645cf0070d5
selftests: net: terminate bkg() commands on exception

There is a number of:

  with bkg("socat ..LISTEN..", exit_wait=True)

uses in the tests. If whatever is supposed to send the traffic
fails we will get stuck in the bkg(). Try to kill the process
in case of exception, to avoid the long wait.

A specific example where this happens is the devmem Tx tests.

Reviewed-by: Joe Damato <joe@dama.to>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250811231334.561137-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib/py/utils.py