]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Relax time constraint in pthread_cond_timedwait unit test
authorvangyzen <vangyzen@FreeBSD.org>
Mon, 5 Aug 2019 22:59:35 +0000 (22:59 +0000)
committervangyzen <vangyzen@FreeBSD.org>
Mon, 5 Aug 2019 22:59:35 +0000 (22:59 +0000)
commit9a9a33398db6cf89ff0f203423a28e4589b90949
treed4991e2df3883aac651f7475ed0d4b8a42130aa5
parent242d0be1ff3ba3fa8e3a13b6f410a93b9831b95a
Relax time constraint in pthread_cond_timedwait unit test

pthread_cond_timedwait() should wait _at least_ until the timeout,
but it might appear to wait longer due to system activity and
scheduling.  The test ignored fractional seconds when comparing the
actual and expected timeouts, so it allowed anywhere between zero
and one extra second of wait time.  Zero is a bit unreasonable.
Compare fractional seconds so we always allow up to one extra second.

Reviewed by: ngie
MFC after: 1 week
Sponsored by: Dell EMC Isilon
contrib/netbsd-tests/lib/libpthread/t_condwait.c