about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/tst-timerfd.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* linux: Only use 64-bit syscall if required for timerfd_settimeAdhemerval Zanella2021-06-221-2/+32
| | | | | | | | | | | For !__ASSUME_TIME64_SYSCALLS there is no need to issue a 64-bit syscall if the provided timeout fits in a 32-bit one. The 64-bit usage should be rare since the timeout is a relative one. Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel (with and without --enable-kernel=5.1) and on x86_64-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* tst: Fix tst-timerfd testLukasz Majewski2021-03-021-11/+4
| | | | | | | | | | | | | | | | | | | There were following problems discovered for tst-timerfd test: 1. Do not set the struct itimerspec's it_interval tv_sec to 2 seconds. After this change the timerfd will trigger only once (the it_value is only set in this case). 2. The 'val1' variable (including the call to timerfd_gettime) is not needed anymore, as it is just enough to read the struct itimerspec after sleep. As a consequence the 'val2' has been renamed to 'val'. 3. After calling timerfd_gettime, the value of struct itimerspec time, when timer is running, is the remaining time. In the case of this test it would be less than 1 second. As a result the TEST_COMPARE macro logic had to be adjusted. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Provide test for timerfd related functionsLukasz Majewski2021-02-081-0/+65
This change adds new test to assess functionality of timerfd_* functions. It creates new timer (operates on its file descriptor) and checks if time before and after sleep is between expected values.