mirror-linux/tools/testing/selftests/timers
John Stultz ed366de8ec selftests: timers: Fix abs() warning in posix_timers test
Building with clang results in the following warning:

  posix_timers.c:69:6: warning: absolute value function 'abs' given an
      argument of type 'long long' but has parameter of type 'int' which may
      cause truncation of value [-Wabsolute-value]
        if (abs(diff - DELAY * USECS_PER_SEC) > USECS_PER_SEC / 2) {
            ^
So switch to using llabs() instead.

Fixes: 0bc4b0cf15 ("selftests: add basic posix timers selftests")
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240410232637.4135564-3-jstultz@google.com
2024-04-12 14:11:15 +02:00
..
.gitignore
Makefile
adjtick.c selftests: timers: fix declarations of main() 2022-07-14 14:36:07 -06:00
alarmtimer-suspend.c selftests:timers: globals don't need initialization to 0 2022-07-03 13:26:45 -06:00
change_skew.c selftests: timers: fix declarations of main() 2022-07-14 14:36:07 -06:00
clocksource-switch.c selftests: timers: clocksource-switch: adapt to kselftest framework 2022-07-14 14:36:52 -06:00
freq-step.c
inconsistency-check.c selftests: timers: inconsistency-check: adapt to kselftest framework 2022-07-14 14:36:18 -06:00
leap-a-day.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
leapcrash.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
mqueue-lat.c
nanosleep.c selftests: timers: nanosleep: adapt to kselftest framework 2022-07-14 14:36:13 -06:00
nsleep-lat.c selftests: timers: Convert nsleep-lat test to generate KTAP output 2023-10-05 15:00:14 -06:00
posix_timers.c selftests: timers: Fix abs() warning in posix_timers test 2024-04-12 14:11:15 +02:00
raw_skew.c tools: timers: fix freq average calculation 2023-07-13 13:32:36 -06:00
rtcpie.c selftests: timers: rtcpie: skip test if default RTC device does not exist 2021-06-07 19:18:52 -06:00
set-2038.c
set-tai.c
set-timer-lat.c
set-tz.c
settings
skew_consistency.c selftests: timers: fix declarations of main() 2022-07-14 14:36:07 -06:00
threadtest.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
valid-adjtimex.c selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior 2024-04-10 22:07:42 +02:00