stop waithires.t failing under high load
authorDavid Mitchell <davem@iabyn.com>
Fri, 15 Apr 2011 09:17:07 +0000 (10:17 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 15 Apr 2011 09:23:43 +0000 (10:23 +0100)
commitbb09c94c3bb1638714998511ecf5d337a708535a
tree52dba2d0454f4997512d9ad2939bf8d681fea35c
parentb4ffc3db31e268adb50c44bab9b628dc619f1e83
stop waithires.t failing under high load

In threads::shared, the waithires.t test checks cond_timedwait() with
sub-second timeouts. If the newly-minted child doesn't manage to grab the
lock within 0.05s, the cond_timedwait() will timeout, and the child and
the test will hang, until eventually killed off by the watchdog.  This can
easily happen on a slow/loaded system.

We fix this by putting the cond_timedwait() in a retry loop, only giving
up after 10 seconds of repeated timeouts.
dist/threads-shared/t/waithires.t