timeval: Workaround for threaded test failures
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 20 Dec 2013 10:31:05 +0000 (19:31 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 20 Dec 2013 15:56:49 +0000 (07:56 -0800)
commitac3c0be096b7aa8d3681dd1e298c37cc932e0da5
tree3ba978096b5e945e7bf50eb11781aa5ce96bd755
parentbf06c4fe3977f98cad16cecc891d50f826fcd5e3
timeval: Workaround for threaded test failures

BFD tests have the code like the following.

    # wait for a while to stablize everything.
    for i in `seq 0 9`; do ovs-appctl time/warp 500; done

They no longer work as intended because BFD code is run in a
separate monitor thread these days.  The loop merely "warp"
the time by 5000.  The monitor thread should have been woken
at least once, but it's far from "wait for a while to stablize
everything."

This commit mitigates the problem by sleeping a little in the
appctl handler.  This is not ideal but makes BFD tests success
on my environment.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/timeval.c