[PATCH 2/5] selftests: vDSO: vdso_test_abi: Drop clock availability tests

From: Thomas Weißschuh
Date: Mon Jul 07 2025 - 10:27:37 EST


The test uses the kselftest.h framework and declares in its testplan to
always execute 16 testcases. If any of the clockids were not available
the testplan would not be satisfied anymore and the test would fail.
Apparently that never happened, so the clockids are always available.

Remove the pointless checks.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
tools/testing/selftests/vDSO/vdso_test_abi.c | 24 ------------------------
1 file changed, 24 deletions(-)

diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c b/tools/testing/selftests/vDSO/vdso_test_abi.c
index 63eafb5ac0bfa407a527343f4d587e5098454f1f..407817e929d89ee434191e336da0e6f18b989a71 100644
--- a/tools/testing/selftests/vDSO/vdso_test_abi.c
+++ b/tools/testing/selftests/vDSO/vdso_test_abi.c
@@ -198,37 +198,13 @@ int main(int argc, char **argv)

vdso_test_gettimeofday();

-#if _POSIX_TIMERS > 0
-
-#ifdef CLOCK_REALTIME
vdso_test_clock(CLOCK_REALTIME);
-#endif
-
-#ifdef CLOCK_BOOTTIME
vdso_test_clock(CLOCK_BOOTTIME);
-#endif
-
-#ifdef CLOCK_TAI
vdso_test_clock(CLOCK_TAI);
-#endif
-
-#ifdef CLOCK_REALTIME_COARSE
vdso_test_clock(CLOCK_REALTIME_COARSE);
-#endif
-
-#ifdef CLOCK_MONOTONIC
vdso_test_clock(CLOCK_MONOTONIC);
-#endif
-
-#ifdef CLOCK_MONOTONIC_RAW
vdso_test_clock(CLOCK_MONOTONIC_RAW);
-#endif
-
-#ifdef CLOCK_MONOTONIC_COARSE
vdso_test_clock(CLOCK_MONOTONIC_COARSE);
-#endif
-
-#endif

vdso_test_time();


--
2.50.0