| 49bf9e5e | 04-May-2026 |
Willem de Bruijn <willemb@google.com> |
selftests: net: py: add tc utility
Add a wrapper similar to existing ip, ethtool, ... commands.
Tc takes a slightly different syntax. Account for that.
The first user is the next patch in this ser
selftests: net: py: add tc utility
Add a wrapper similar to existing ip, ethtool, ... commands.
Tc takes a slightly different syntax. Account for that.
The first user is the next patch in this series, converting so_txtime to drv-net. Pacing offload is supported by selected qdiscs only.
Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260504174056.565319-3-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| f0bd1931 | 10-Mar-2026 |
Gal Pressman <gal@nvidia.com> |
selftests: net: fix timeout passed as positional argument to communicate()
The cited commit refactored the hardcoded timeout=5 into a parameter, but dropped the keyword from the communicate() call.
selftests: net: fix timeout passed as positional argument to communicate()
The cited commit refactored the hardcoded timeout=5 into a parameter, but dropped the keyword from the communicate() call. Since Popen.communicate()'s first positional argument is 'input' (not 'timeout'), the timeout value is silently treated as stdin input and the call never enforces a timeout.
Pass timeout as a keyword argument to restore the intended behavior.
Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Link: https://patch.msgid.link/20260310115803.2521050-3-gal@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 6e4dff20 | 23-Feb-2026 |
Jakub Kicinski <kuba@kernel.org> |
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 rece
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>
show more ...
|
| 04abab18 | 23-Feb-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: use repr(cmd) for failure exceptions
Reuse repr(cmd) instead of manually formatting a similar string.
Before: # Exception| lib.py.utils.CmdExitFailure: Command failed: false
selftests: net: py: use repr(cmd) for failure exceptions
Reuse repr(cmd) instead of manually formatting a similar string.
Before: # Exception| lib.py.utils.CmdExitFailure: Command failed: false # Exception| STDOUT: b'' # Exception| STDERR: b''
After: # Exception| lib.py.utils.CmdExitFailure: Command failed # Exception| CMD: false # Exception| EXIT: 1
Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260223202633.4126087-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| ce0f92dc | 13-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: teach cmd() how to print itself
Teach cmd() how to print itself, to make debug prints easier. Example output (leading # due to ksft_pr()):
# CMD: /root/ksft-net-drv/drivers/ne
selftests: net: py: teach cmd() how to print itself
Teach cmd() how to print itself, to make debug prints easier. Example output (leading # due to ksft_pr()):
# CMD: /root/ksft-net-drv/drivers/net/gro # EXIT: 1 # STDOUT: ipv6 with ext header does coalesce: # STDERR: Expected {200 }, Total 1 packets # Received {100 [!=200]100 [!=0]}, Total 2 packets.
Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20260113000740.255360-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 7a1ff354 | 08-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: ensure defer() is only used within a test case
I wasted a couple of hours recently after accidentally adding a defer() from within a function which itself was called as part of d
selftests: net: py: ensure defer() is only used within a test case
I wasted a couple of hours recently after accidentally adding a defer() from within a function which itself was called as part of defer(). This leads to an infinite loop of defer(). Make sure this cannot happen and raise a helpful exception.
I understand that the pair of _ksft_defer_arm() calls may not be the most Pythonic way to implement this, but it's easy enough to understand.
Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20260108225257.2684238-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 15011a57 | 20-Nov-2025 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: read ip link info about remote dev
We're already saving the info about the local dev in env.dev for the tests, save remote dev as well. This is more symmetric, env generally prov
selftests: net: py: read ip link info about remote dev
We're already saving the info about the local dev in env.dev for the tests, save remote dev as well. This is more symmetric, env generally provides the same info for local and remote end.
While at it make sure that we reliably get the detailed info about the local dev. nsim used to read the dev info without -d.
Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20251120021024.2944527-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|