[PATCH 0/4] Add stress-ng to CI (v2)

Christian Franke Christian.Franke@t-online.de
Mon Apr 28 15:40:43 GMT 2025


Christian Franke wrote:
> Jon Turney wrote:
> ...
>
>> Any insight into what's going on with the 'clock' test?
>
> No, as I could not reproduce it (on a real machine) yet. Possibly an 
> effect which only happens if run in a VM?
>

It possibly only happens when run with admin privileges. Is this the 
case during CI tests?

If yes, the error message
"clock_settime was able to set an invalid negative time for timer 
'CLOCK_REALTIME'"
occurs because clock_settime(CLOCK_REALTIME, &t) with t={-1,-1} should 
fail but succeeds, see:
https://github.com/ColinIanKing/stress-ng/blob/V0.18.12/stress-clock.c#L297

Cygwin then calls Win32 SetSystemTime() for (time_t)-1:

   $ date -u -Is -d @-1
   1969-12-31T23:59:59+00:00

which likely succeeds as stress-ng prints the interesting timestamp 
"00:00:00.-99".

tv_sec = -1 is possibly valid but tv_nsec = -1 is not. I will post a patch.

-- 
Regards,
Christian



More information about the Cygwin-patches mailing list