Skip to content

Commit

Permalink
ovs-vsctl.at: Fix intermittent failure.
Browse files Browse the repository at this point in the history
This commit fixes the intermittent test failure caused by the
race between the test thread and logging thread.

Signed-off-by: Alex Wang <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
yew011 committed Jan 30, 2015
1 parent 5989a51 commit 9530457
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/ovs-vsctl.at
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,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_UNTIL([test `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
Expand Down Expand Up @@ -1280,6 +1282,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_UNTIL([test `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
Expand Down

0 comments on commit 9530457

Please sign in to comment.