From: YAMAMOTO Takashi Date: Fri, 20 Dec 2013 10:31:04 +0000 (+0900) Subject: tests/ofproto-dpif.at: Workaround a race X-Git-Tag: v2.1.0~76 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=bf06c4fe3977f98cad16cecc891d50f826fcd5e3 tests/ofproto-dpif.at: Workaround a race 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 Signed-off-by: Ben Pfaff --- diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index e81314750..72308547e 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -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