Skip to content

Commit

Permalink
tests: Fix race in async config test.
Browse files Browse the repository at this point in the history
Occasionally, the testsuite would send the OFPT_SET_ASYNC before
ovs-vswitchd got a chance to send its OFPT_ROLE_REPLY message, causing a
reordering of the testsuite output and a false positive. Give the test
script something extra to do so this is less likely to happen.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
  • Loading branch information
joestringer committed Dec 4, 2014
1 parent cea4a6d commit 5b7278a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ofproto-dpif.at
Expand Up @@ -2642,6 +2642,8 @@ OVS_VSWITCHD_START([dnl
])
ON_EXIT([kill `cat ovs-ofctl.pid`])

ovs-appctl time/stop

AT_CAPTURE_FILE([ofctl_monitor.log])
# A table-miss flow has priority 0 and no match
AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
Expand All @@ -2652,9 +2654,13 @@ AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --det
# Become slave (OF 1.3), which should disable everything except port status.
ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001

# Ensure that ovs-vswitchd gets a chance to reply before sending another command.
ovs-appctl time/warp 500 100

# Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000

ovs-appctl time/warp 500 100
for i in 1 2 3 ; do
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
done
Expand Down

0 comments on commit 5b7278a

Please sign in to comment.