[LTP] [PATCH 2/5] syscalls: settimeofday: Use gettimeofday()
Arnd Bergmann
arnd@arndb.de
Tue May 19 14:47:49 CEST 2020
On Tue, May 19, 2020 at 2:15 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> You can set the .restore_wallclock flag in the tst_test structure for
> these two tests and remove the setup() and cleanup() as well.
>
> Also in the settimeofday02 I would be inclined to just remove the clock
> restoration code, since there is no way the tim will be changed unless
> the kernel is buggy.
Ah, I did not realize that LTP actually does try to set the clock and then
set it back. If it does that, it may be very interesting to test the behavior
across the y2038 overflow, e.g. set the time ot just after the 2038-01-19
expiration and ensure the kernel still behaves as expected, or set the
timer to just before the overflow and set a timer just after, and see that
the timer triggers.
Arnd
More information about the ltp
mailing list