diff options
author | Kees Cook <keescook@chromium.org> | 2019-04-24 16:12:37 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-04-25 13:15:46 -0600 |
commit | 5821ba969511daf27fa917515904f7b823259cf7 (patch) | |
tree | 37b040c435d57a2e3485d297c42eb877cda6d7a7 /tools/testing/selftests/capabilities | |
parent | f41c322f17ec4aa809222dc352439d80862c175b (diff) | |
download | linux-stable-5821ba969511daf27fa917515904f7b823259cf7.tar.gz linux-stable-5821ba969511daf27fa917515904f7b823259cf7.tar.bz2 linux-stable-5821ba969511daf27fa917515904f7b823259cf7.zip |
selftests: Add test plan API to kselftest.h and adjust callers
The test plan for TAP needs to be declared immediately after the header.
This adds the test plan API to kselftest.h and updates all callers to
declare their expected test counts.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/capabilities')
-rw-r--r-- | tools/testing/selftests/capabilities/test_execve.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests/capabilities/test_execve.c index 3ab39a61b95b..df0ef02b4036 100644 --- a/tools/testing/selftests/capabilities/test_execve.c +++ b/tools/testing/selftests/capabilities/test_execve.c @@ -430,8 +430,6 @@ int main(int argc, char **argv) { char *tmp1, *tmp2, *our_path; - ksft_print_header(); - /* Find our path */ tmp1 = strdup(argv[0]); if (!tmp1) @@ -445,6 +443,8 @@ int main(int argc, char **argv) mpid = getpid(); if (fork_wait()) { + ksft_print_header(); + ksft_set_plan(12); ksft_print_msg("[RUN]\t+++ Tests with uid == 0 +++\n"); return do_tests(0, our_path); } @@ -452,6 +452,8 @@ int main(int argc, char **argv) ksft_print_msg("==================================================\n"); if (fork_wait()) { + ksft_print_header(); + ksft_set_plan(9); ksft_print_msg("[RUN]\t+++ Tests with uid != 0 +++\n"); return do_tests(1, our_path); } |