Occasionally, test #770 "ofproto-dpif - ofproto-dpif-monitor 1" would
fail, because the testsuite looked in the logs for evidence of a thread
being created, but it checked before vswitchd was able to spawn the
thread.

This patch fixes the race by waiting until there is a reasonable amount
of logs already, then checking for the expected messages.

Signed-off-by: Joe Stringer <joestrin...@nicira.com>
---
 tests/ofproto-dpif.at |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 89c8ad7..77656db 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -4491,6 +4491,9 @@ OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 
type=gre options:remote_
 
 # enable bfd on p0.
 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
+
+OVS_WAIT_UNTIL([test `wc -l < ovs-vswitchd.log` -ge 20])
+
 # check log.
 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor)|INFO|\(.* 
created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
 monitor thread created
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to