mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
sysctl: Rewrite selftests on top of KTAP helpers
Use kselftest/ktap_helpers.sh so that each test reports its own KTAP
result. A failure names the test but continues with the rest of the
suite. Tests are functions prefixed by "test_", they run in a subshell
and do not leak state to other tests. Sysctl test assertions (assert*)
emit a KTAP diagnostic and return a status, never exit.
The sysctl selftests arguments are:
-r N repeat selected tests N times (default 1)
-l list discovered tests
-t T space separated tests list. For example "test_1 test_2"
-s N base seed for the randomized bitmap iterations.
-h, --help help
It is a single commit to avoid intermediate states where the runner
exists with no tests or where scaffolding is added only to be deleted
later in the same series. Neither bisects usefully.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
parent
1068f1c5f7
commit
ccb5bf46e3