linux/tools/testing/selftests/net/lib/py
Jakub Kicinski e46ff213f7 selftests: net: py: add test case filtering and listing
When developing new test cases and reproducing failures in
existing ones we currently have to run the entire test which
can take minutes to finish.

Add command line options for test selection, modeled after
kselftest_harness.h:

  -l       list tests (filtered, if filters were specified)
  -t name  include test
  -T name  exclude test

Since we don't have as clean separation into fixture / variant /
test as kselftest_harness this is not really a 1 to 1 match.
We have to lean on glob patterns instead.

Like in kselftest_harness filters are evaluated in order, first
match wins. If only exclusions are specified everything else is
included and vice versa.

Glob patterns (*, ?, [) are supported in addition to exact
matching.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Tested-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260410013921.1710295-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-12 09:09:09 -07:00
..
__init__.py selftests: net: move common xdp.py functions into lib 2026-03-29 14:09:08 -07:00
bpf.py selftests: net: move common xdp.py functions into lib 2026-03-29 14:09:08 -07:00
consts.py selftests: net: add scaffolding for Netlink tests in Python 2024-04-08 11:40:41 +01:00
ksft.py selftests: net: py: add test case filtering and listing 2026-04-12 09:09:09 -07:00
netns.py selftests: net: Add python context manager for netns entering 2025-02-21 15:28:03 -08:00
nsim.py selftests: net: py: read ip link info about remote dev 2025-11-20 18:19:29 -08:00
utils.py selftests: net: py: give bpftrace more time to start 2026-03-16 19:26:37 -07:00
ynl.py selftests: net: add test for Netlink policy dumps 2026-03-12 18:02:13 -07:00