Skip to content

Commit 4b59a9f

Browse files
t-8chKAGA-KOKO
authored andcommitted
selftests: vDSO: vdso_test_abi: Correctly skip whole test with missing vDSO
If AT_SYSINFO_EHDR is missing the whole test needs to be skipped. Currently this results in the following output: TAP version 13 1..16 # AT_SYSINFO_EHDR is not present! This output is incorrect, as "1..16" still requires the subtest lines to be printed, which isn't done however. Switch to the correct skipping functions, so the output now correctly indicates that no subtests are being run: TAP version 13 1..0 # SKIP AT_SYSINFO_EHDR is not present! Fixes: 693f5ca ("kselftest: Extend vDSO selftest") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250812-vdso-tests-fixes-v2-2-90f499dd35f8@linutronix.de
1 parent 9f15e0f commit 4b59a9f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/testing/selftests/vDSO/vdso_test_abi.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,11 @@ int main(int argc, char **argv)
182182
unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
183183

184184
ksft_print_header();
185-
ksft_set_plan(VDSO_TEST_PLAN);
186185

187-
if (!sysinfo_ehdr) {
188-
ksft_print_msg("AT_SYSINFO_EHDR is not present!\n");
189-
return KSFT_SKIP;
190-
}
186+
if (!sysinfo_ehdr)
187+
ksft_exit_skip("AT_SYSINFO_EHDR is not present!\n");
188+
189+
ksft_set_plan(VDSO_TEST_PLAN);
191190

192191
version = versions[VDSO_VERSION];
193192
name = (const char **)&names[VDSO_NAMES];

0 commit comments

Comments
 (0)