This commit fixes the intermittent test failure caused by the race between the test thread and logging thread.
Signed-off-by: Alex Wang <al...@nicira.com> --- tests/ovs-vsctl.at | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index f6e6994..433b964 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -1242,6 +1242,10 @@ m4_foreach( AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl ovs-vsctl: Error detected while setting up 'reserved_name'. See ovs-vswitchd log for details. ]) + +# Prevent race. +OVS_WAIT_WHILE([`grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1]) + # Detect the warning log message AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl |bridge|WARN|could not create interface reserved_name, name is reserved @@ -1280,6 +1284,8 @@ m4_foreach( AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl ovs-vsctl: Error detected while setting up 'reserved_name'. See ovs-vswitchd log for details. ]) +# Prevent race. +OVS_WAIT_WHILE([`grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1]) # Detect the warning log message AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl |bridge|WARN|could not create interface reserved_name, name is reserved -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev