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>
This commit is contained in:
@@ -395,6 +395,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Test requeue functionality\n", basename(argv[0]));
|
||||
ksft_print_msg(
|
||||
"\tArguments: broadcast=%d locked=%d owner=%d timeout=%ldns\n",
|
||||
|
@@ -79,6 +79,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Detect mismatched requeue_pi operations\n",
|
||||
basename(argv[0]));
|
||||
|
||||
|
@@ -144,6 +144,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Test signal handling during requeue_pi\n",
|
||||
basename(argv[0]));
|
||||
ksft_print_msg("\tArguments: <none>\n");
|
||||
|
@@ -98,6 +98,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg(
|
||||
"%s: Test the futex value of private file mappings in FUTEX_WAIT\n",
|
||||
basename(argv[0]));
|
||||
|
@@ -69,6 +69,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Block on a futex and wait for timeout\n",
|
||||
basename(argv[0]));
|
||||
ksft_print_msg("\tArguments: timeout=%ldns\n", timeout_ns);
|
||||
|
@@ -100,6 +100,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Test the uninitialized futex value in FUTEX_WAIT\n",
|
||||
basename(argv[0]));
|
||||
|
||||
|
@@ -65,6 +65,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ksft_print_header();
|
||||
ksft_set_plan(1);
|
||||
ksft_print_msg("%s: Test the unexpected futex value in FUTEX_WAIT\n",
|
||||
basename(argv[0]));
|
||||
|
||||
|
Reference in New Issue
Block a user