summaryrefslogtreecommitdiff
path: root/rust/kernel/ptr/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2026-02-25 01:08:33 +0000
committerShuah Khan <skhan@linuxfoundation.org>2026-03-31 14:48:48 -0600
commit2964f6b816c25ee094df4a143eb5b8828910045f (patch)
treef64c80614f97ce9baa6016f9108507ba5e4808e3 /rust/kernel/ptr/git@git.tavy.me:linux.git
parent132618c5b69364b888b9cefc6c2ef6ee3f965ae6 (diff)
selftests: Use ktap helpers for runner.sh
Instead of manually writing ktap messages, we should use the formal ktap helpers in runner.sh. Brendan did some work in commit d9e6269e3303 ("selftests/run_kselftest.sh: exit with error if tests fail") to make run_kselftest.sh exit with the correct return value. However, the output does not include the total results, such as how many tests passed or failed. Let’s convert all manually printed messages in runner.sh to use the formal ktap helpers. Here are what I changed: 1. Move TAP header from runner.sh to run_kselftest.sh, since run_kselftest.sh is the only caller of run_many(). 2. In run_kselftest.sh, call run_many() in main process to count the pass/fail numbers. 3. In run_kselftest.sh, do not generate kselftest_failures_file. Just use ktap_print_totals to report the result. 4. In runner.sh run_one(), get the return value and use ktap helpers for all pass/fail reporting. This allows counting pass/fail numbers in the main process. 5. In runner.sh run_in_netns(), also return the correct rc, so we can count results during wait. After the change, the printed result looks like: not ok 4 4 selftests: clone3: clone3_cap_checkpoint_restore # exit=1 # Totals: pass:3 fail:1 xfail:0 xpass:0 skip:0 error:0 ]# echo $? 1 Fixed change log commit description errors and long lines: Shuah Khan <skhan@linuxfoundation.org> Tested-by: Brendan Jackman <jackmanb@google.com> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Brendan Jackman <jackmanb@google.com> Link: https://lore.kernel.org/r/20260225010833.11301-1-liuhangbin@gmail.com Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/ptr/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions