tests: Wait for ARPs to be sent in tunnel-push-pop.
authorDaniele Di Proietto <diproiettod@vmware.com>
Fri, 20 May 2016 18:14:13 +0000 (11:14 -0700)
committerDaniele Di Proietto <diproiettod@vmware.com>
Thu, 2 Jun 2016 22:01:32 +0000 (15:01 -0700)
Otherwise the tests can fail under heavy load (or with valgrind).

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
tests/tunnel-push-pop.at

index 64a0cbe..795af1a 100644 (file)
@@ -43,6 +43,11 @@ dnl Check ARP request
 AT_CHECK([ovs-vsctl -- set Interface p0 options:pcap=p0.pcap])
 
 AT_CHECK([ovs-appctl netdev-dummy/receive int-br 'in_port(2),eth(src=aa:55:aa:55:00:00,dst=f8:bc:12:ff:ff:ff),eth_type(0x0800),ipv4(src=1.1.3.92,dst=1.1.3.88,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
+
+dnl Wait for the two ARP requests to be sent. Sometimes the system
+dnl can be slow (e.g. under valgrind)
+OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | sort | uniq | wc -l` -ge 2])
+
 AT_CHECK([ovs-pcap p0.pcap > p0.pcap.txt 2>&1])
 
 AT_CHECK([cat p0.pcap.txt | grep 101025c | uniq], [0], [dnl