On 2011-10-04, at 11:20 PM, Juho Snellman wrote:
> I didn't make the release, since a test was failing on x86-64 Linux, and I
> didn't have time to dig into it during the weekend. The failure is in
> :sleep-many-interrupts, added in e62bb3a4b9633dbd898fca05cc4af3dd0a16e0aa.
> It's basically checking that code like...
> sleep 1.5 seconds
> interrupt the sleep with a signal, spend some time in the interrupt handler
> sleep returns with eintr
> return to sleep
> ... takes about 1.5 seconds to execute. Actually it's taking a fair bit
> more. What seems to be happening is that the test is assuming that the
> remaining time of an interrupted nanosleep() will be the time from the call
> to the time the call returns. What I'm seeing on Linux is that it's the time
> from the call to the time the signal handler is called.
> a) Is anyone else seeing this failure, and on what platforms?
> b) Is this test valid at all? The spec for nanosleep() is of silent on the
I'm pretty sure that the test is invalid and depends on standard-breaking behaviour in Darwin. FWIW, POSIX says not to do precisely what we're doing (looping around nanosleep).