lockfile: Don't warn if successful lock takes a little time.
authorBen Pfaff <blp@nicira.com>
Fri, 13 May 2011 21:43:44 +0000 (14:43 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 13 May 2011 21:43:44 +0000 (14:43 -0700)
commitbc9dcfb37146e813200ffcc552365c8ec3e72ff8
tree2a2c04c596b2302c280c169894d5d1a8d0b2dd97
parent7fcfe998c5e3356fe04fb183f9f33d3c9fbbb387
lockfile: Don't warn if successful lock takes a little time.

This code issues a warning if obtaining a lock takes even 1 millisecond.
That's far too aggressive.  There's no need to warn if we have to wait
a few milliseconds.  This function already warns elsewhere if locking takes
more than 1 second, which is much more reasonable.

This change allows us to test ovsdb-server stderr output more carefully.
Before now, the tests had to ignore what ovsdb-server writes to stderr
because sometimes it would log a warning that locking took 1 ms (or so).

Reviewed-by: Simon Horman <horms@verge.net.au>
lib/lockfile.c
tests/daemon.at
tests/ovsdb-log.at
tests/ovsdb-server.at