summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/verification
diff options
context:
space:
mode:
authorWake Liu <wakel@google.com>2026-06-10 01:47:21 +0000
committerThomas Gleixner <tglx@kernel.org>2026-07-10 09:20:55 +0200
commitf44ce7fdbdd00a596455b8689b62c12d5530d610 (patch)
treecf4b4ba2f36aace40f57a91b359337d3acd2beff /tools/testing/selftests/verification
parent794ddd6e15cfd133c4a5c01dac37a5da04cbe186 (diff)
downloadlinux-next-f44ce7fdbdd00a596455b8689b62c12d5530d610.tar.gz
linux-next-f44ce7fdbdd00a596455b8689b62c12d5530d610.zip
selftests: timers: Partially revert "Remove local NSEC_PER_SEC and USEC_PER_SEC defines"
This partially reverts commit 80fa614e2fbc ("selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines"). The original commit removed local definitions of NSEC_PER_SEC and USEC_PER_SEC in favor of including <include/vdso/time64.h>. However, NSEC_PER_SEC in vdso/time64.h is defined as 1000000000L, which is 32-bit on 32-bit architectures. This causes integer overflow warnings in several timer tests when doing arithmetic like NSEC_PER_SEC * 10 on 32-bit systems. To fix this, restore the local definitions of NSEC_PER_SEC and USEC_PER_SEC in the test files, but use "LL" suffix consistently (1000000000LL and 1000000LL) to ensure 64-bit arithmetic and avoid overflows. We keep the cleanup from the original commit that renamed plural definitions (NSECS_PER_SEC/USECS_PER_SEC) to singular ones in posix_timers.c, but we now define them locally there as well. This also removes the dependency of the selftests on the internal kernel header <include/vdso/time64.h>. Signed-off-by: Wake Liu <wakel@google.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Acked-by: John Stultz <jstultz@google.com> Link: https://patch.msgid.link/20260610014721.718362-1-wakel@google.com
Diffstat (limited to 'tools/testing/selftests/verification')
0 files changed, 0 insertions, 0 deletions