tests: Fix race in 'balance-tcp bonding' test.
authorJoe Stringer <joestringer@nicira.com>
Fri, 4 Jul 2014 06:58:28 +0000 (06:58 +0000)
committerBen Pfaff <blp@nicira.com>
Fri, 3 Apr 2015 03:01:47 +0000 (20:01 -0700)
Running the test in a tight loop could cause this test to fail after
about 5 runs, with some of the ports reporting "may_enable: false" in
the "ovs-appctl bond/show" output. This commit fixes the race condition
by waiting for may_enable to be true for all bond ports.

I suspect that LACP negotiation finishes, but the main thread doesn't
have a chance to enable the ports before we send the test packets.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/ofproto-dpif.at

index 212db7f..5e6bf83 100644 (file)
@@ -173,7 +173,7 @@ AT_CHECK([ovs-ofctl add-flow br0 action=normal])
 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
 ], [])
-WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
+OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
 ovs-appctl time/stop
 ovs-appctl time/warp 100
 ovs-appctl lacp/show > lacp.txt