linux-stable/tools/testing
John Stultz 881b495ed2 selftests: timers: Fix abs() warning in posix_timers test
commit ed366de8ec upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-17 11:18:28 +02:00
..
crypto/chacha20-s390 tools/testing/crypto: Use vzalloc instead of vmalloc+memset 2022-07-05 14:46:36 +02:00
cxl cxl/region: Fix x1 root-decoder granularity calculations 2023-11-28 17:07:18 +00:00
fault-injection
ktest ktest: force $buildonly = 1 for 'make_warnings_file' test type 2024-04-13 13:05:15 +02:00
kunit kunit: tool: Don't download risc-v opensbi firmware with wget 2022-10-07 10:16:28 -06:00
memblock memblock tests: fix warning ‘struct seq_file’ declared inside parameter list 2023-10-06 14:56:56 +02:00
nvdimm ndtest: Cleanup all of blk namespace specific code 2022-07-12 17:57:55 -07:00
radix-tree XArray: Do not return sibling entries from xa_load() 2023-09-13 09:43:00 +02:00
scatterlist
selftests selftests: timers: Fix abs() warning in posix_timers test 2024-04-17 11:18:28 +02:00
vsock vsock_test: POLLIN + SO_RCVLOWAT test 2022-08-23 10:43:12 +02:00