From: Jarno Rajahalme Date: Wed, 25 May 2016 23:43:42 +0000 (-0700) Subject: tests: Eliminate some intermittent failures due to races. X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=ed8ac2a03b9bc929b1fd463840e9365d31bbcd6e;p=cascardo%2Fovs.git tests: Eliminate some intermittent failures due to races. Wait until a megaflow is set up before sending more packets to have deterministic stats for the megaflows. Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff --- diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 18e5e2226..9c5e016e0 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -7390,7 +7390,12 @@ ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m' ovs-appctl time/stop -for i in 1 2 3; do +AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)']) + +# Wait for the flow setup to be done. +OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log]) + +for i in 1 2; do ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)' done @@ -7430,8 +7435,12 @@ ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m' ovs-appctl time/stop +AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)']) + # Check that a correct datapath flow is created. -for i in 1 2 3; do +OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log]) + +for i in 1 2; do ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)' done @@ -7471,7 +7480,11 @@ recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actio ]) # Check that VLAN packets will not hit the same datapath megaflow. -for i in 1 2 3; do + +AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x1234))']) +OVS_WAIT_UNTIL([grep 'flow_add:.*dl_vlan=99' ovs-vswitchd.log]) + +for i in 1 2; do ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x1234))' done