From bf06c4fe3977f98cad16cecc891d50f826fcd5e3 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 20 Dec 2013 19:31:04 +0900 Subject: [PATCH] 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 --- tests/ofproto-dpif.at | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.43.0