selftests: vDSO: vdso_test_getrandom: Always print TAP header
The TAP specification requires that the output begins with a header line. If vgetrandom_init() fails and skips the test, that header line is missing. Call vgetrandom_init() after ksft_print_header(). Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-8-e62e37a6bcf5@linutronix.de
This commit is contained in:
committed by
Thomas Gleixner
parent
58265d6424
commit
1158220b24
@@ -242,6 +242,7 @@ static void kselftest(void)
|
||||
pid_t child;
|
||||
|
||||
ksft_print_header();
|
||||
vgetrandom_init();
|
||||
ksft_set_plan(2);
|
||||
|
||||
for (size_t i = 0; i < 1000; ++i) {
|
||||
@@ -295,8 +296,6 @@ static void usage(const char *argv0)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
vgetrandom_init();
|
||||
|
||||
if (argc == 1) {
|
||||
kselftest();
|
||||
return 0;
|
||||
@@ -306,6 +305,9 @@ int main(int argc, char *argv[])
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
vgetrandom_init();
|
||||
|
||||
if (!strcmp(argv[1], "bench-single"))
|
||||
bench_single();
|
||||
else if (!strcmp(argv[1], "bench-multi"))
|
||||
|
||||
Reference in New Issue
Block a user