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:
Joel Granados 2026-09-14 14:40:19 +02:00
parent 1068f1c5f7
commit ccb5bf46e3

File diff suppressed because it is too large Load Diff