tests/ofproto-dpif.at: Workaround a race
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 20 Dec 2013 10:31:04 +0000 (19:31 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 20 Dec 2013 15:56:47 +0000 (07:56 -0800)
This test seems to assume only the first packets in flows
counted as 'miss'.  I don't see any code ensuring that.
The test would fail if the upcall handler for the flow doesn't
run fast enough.  Workaround the problem by giving 1 second
for the miss upcall.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ofproto-dpif.at

index e813147..7230854 100644 (file)
@@ -2387,10 +2387,16 @@ AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
 
 for i in $(seq 1 10); do
     ovs-appctl netdev-dummy/receive br0 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
+    if [[ $i -eq 1 ]]; then
+        sleep 1
+    fi
 done
 
 for i in $(seq 1 5); do
     ovs-appctl netdev-dummy/receive br1 'in_port(101),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
+    if [[ $i -eq 1 ]]; then
+        sleep 1
+    fi
 done
 
 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped