HomeFreeBSD

Relax time constraint in pthread_cond_timedwait unit test

Description

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

Details

Provenance
vangyzenAuthored on
Parents
rS350619: MFC 350618:
Branches
Unknown
Tags
Unknown