diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-02-29 01:59:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-01 11:30:29 +0100 |
commit | 42ab727eb95fcff83e7a67fcdbf467bbcd53451e (patch) | |
tree | 8581d555cef159c2971a3cba46db7d2c9fc6f4af /tools/testing/selftests/kselftest_harness.h | |
parent | selftests: kselftest_harness: print test name for SKIP (diff) | |
download | linux-42ab727eb95fcff83e7a67fcdbf467bbcd53451e.tar.xz linux-42ab727eb95fcff83e7a67fcdbf467bbcd53451e.zip |
selftests: kselftest_harness: separate diagnostic message with # in ksft_test_result_code()
According to the spec we should always print a # if we add
a diagnostic message. Having the caller pass in the new line
as part of diagnostic message makes handling this a bit
counter-intuitive, so append the new line in the helper.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/kselftest_harness.h')
-rw-r--r-- | tools/testing/selftests/kselftest_harness.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 82377051aa54..5b0592e4b7a4 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -1148,7 +1148,7 @@ void __run_test(struct __fixture_metadata *f, if (t->exit_code == KSFT_SKIP) ksft_test_result_code(t->exit_code, test_name, - "%s\n", diagnostic); + "%s", diagnostic); else ksft_test_result(__test_passed(t), "%s\n", test_name); } |