about summary refs log tree commit diff
path: root/time/tst-itimer.c
Commit message (Collapse)AuthorAgeFilesLines
* time: Fix overflow itimer tests on 32-bit systemsStafford Horne2021-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | On the port of OpenRISC I am working on and it appears the rv32 port we have sets __TIMESIZE == 64 && __WORDSIZE == 32. This causes the size of time_t to be 8 bytes, but the tv_sec in the kernel is still 32-bit causing truncation. The truncations are unavoidable on these systems so skip the testing/failures by guarding with __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64. Also, futher in the tests and in other parts of code checking for time_t overflow does not work on 32-bit systems when time_t is 64-bit. As suggested by Adhemerval, update the in_time_t_range function to assume 32-bits by using int32_t. This also brings in the header for stdint.h so we can update other usages of __int32_t to int32_t as suggested by Adhemerval. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* time: Add getitimer and setitimer basic testsAdhemerval Zanella2021-04-151-0/+175
Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>