]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: net: py: add cmd info for ksft_wait failure
authorJakub Kicinski <kuba@kernel.org>
Mon, 23 Feb 2026 20:26:33 +0000 (12:26 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Feb 2026 02:25:29 +0000 (18:25 -0800)
commit6e4dff20021ad280bc9c8e047239707da7689431
tree62dc8bb5a7b6bd78c2353233ed394cf84e9a024a
parent04abab18e1205a9e2037fb95f334b80cf74f89c9
selftests: net: py: add cmd info for ksft_wait failure

Gal recently complained:

  When [ksft_wait failure] happens, the test fails with a cryptic
  message:
    # Exception| Exception: Did not receive ready message

Let's try to include the stdout/stderr of the command we tried
to start. E.g. for cmd("false", ksft_wait=True):

    # Exception| lib.py.utils.CmdInitFailure: Did not receive ready message
    # Exception| CMD: false
    # Exception|   EXIT: 1

We need to factor out _process_terminate() otherwise the exit
path may try to write to already disconnected self.ksft_term_fd.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260223202633.4126087-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib/py/utils.py