[PATCH v2] tests: posix: use cpu clock for sleep
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Feb 25 13:42:34 GMT 2026
On 18/02/26 12:55, DJ Delorie wrote:
> Yury Khrustalev <yury.khrustalev@arm.com> writes:
>> The problem is that it doesn't to nothing exactly: it advances "time" by
>> whatever delta we're waiting for but does so instantly so the current
>> thread continues but its perception of the result of time() has changed
>> in a "correct" way.
>
> Ok, that's evil, as it means program wall time is disconnected from real
> wall time. Does usleep() do that? If it does, I don't see any way
> around it besides your original patch. Or declare such emulations
> broken and move forward ;-)
>
I don't think a busy-wait would be a problem for this test, we already have
some similar tests for clock checks and 1s walltime should be ok. DJ, do
think it should be a block for this fix?
More information about the Libc-alpha
mailing list