diff options
author | Andrei Vagin <avagin@gmail.com> | 2020-05-21 00:52:52 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-05-22 13:29:55 -0600 |
commit | 558ae0355a91c7d28fdf4c0011bee6ebb5118632 (patch) | |
tree | a027e46534ad7b0c4aff3beee6533ed257ae3217 /tools/testing/selftests/timens/timer.c | |
parent | 5627f9cffee73dca9762135b6a8c7ab7213f31e2 (diff) |
selftests/timens: handle a case when alarm clocks are not supported
This can happen if a testing node doesn't have RTC (real time clock)
hardware or it doesn't support alarms.
Fixes: 61c57676035d ("selftests/timens: Add Time Namespace test for supported clocks")
Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reported-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/timens/timer.c')
-rw-r--r-- | tools/testing/selftests/timens/timer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/timens/timer.c b/tools/testing/selftests/timens/timer.c index 96dba11ebe44..5e7f0051bd7b 100644 --- a/tools/testing/selftests/timens/timer.c +++ b/tools/testing/selftests/timens/timer.c @@ -22,6 +22,9 @@ int run_test(int clockid, struct timespec now) timer_t fd; int i; + if (check_skip(clockid)) + return 0; + for (i = 0; i < 2; i++) { struct sigevent sevp = {.sigev_notify = SIGEV_NONE}; int flags = 0; @@ -74,6 +77,8 @@ int main(int argc, char *argv[]) nscheck(); + check_supported_timers(); + ksft_set_plan(3); clock_gettime(CLOCK_MONOTONIC, &mtime_now); |