Home | History | Annotate | Download | only in kernel
History log of /src/tests/kernel/t_nanosleep.c
RevisionDateAuthorComments
 1.2  07-Oct-2025  andvar Fix few typos in comments.
 1.1  09-Oct-2024  kre branches: 1.1.4;
Add a test for clock_nanotime() [ PR kern/58733 ]

Add a t_nanosleep test to the kernel tests, to (to a limited extent)
validate its functionality.

Initially this concentrates on the issue from PR kern/58733
where if a process paused in nanosleep() is stopped, and then
continued, and if it is using TIMER_ABSTIME, the call will
return prematurely, but indicating success.

There are (currently) 4 test cases, to test all 4 possibilities
using CLOCK_MONOTONIC and CLOCK_REALTIME (if someone wants to
add any other clocks that make sense, that should be easy) and
TIMER_ABSTIME and TIMER_RELTIME.

Currently both TIMER_ABSTIME tests fail (the TIMER_RELTIME
tests pass). When the kernel bug is fixed, the ABSTIME
tests should be fixed along with it.

These tests are currently somewhat crude, and I'm not sure
how well they will work on a qemu test system (they work as
expected on bare metal).
 1.1.4.2  02-Aug-2025  perseant Sync with HEAD
 1.1.4.1  09-Oct-2024  perseant file t_nanosleep.c was added on branch perseant-exfatfs on 2025-08-02 05:58:01 +0000

RSS XML Feed