diff mbox

[ovs-dev] tests: Avoid race in tunnel-push-pop tests.

Message ID 1471548370-64350-1-git-send-email-jesse@kernel.org
State Accepted
Headers show

Commit Message

Jesse Gross Aug. 18, 2016, 7:26 p.m. UTC
These tests dump the flows currently in the datapath but they aren't
the first to run and might have existing flows left over. We don't
really care if there are others flows present so filter on the ones
we want to avoid being affected by the timing of flow eviction.

Signed-off-by: Jesse Gross <jesse@kernel.org>
---
 tests/tunnel-push-pop-ipv6.at | 2 +-
 tests/tunnel-push-pop.at      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Pravin Shelar Aug. 18, 2016, 11:36 p.m. UTC | #1
On Thu, Aug 18, 2016 at 12:26 PM, Jesse Gross <jesse@kernel.org> wrote:
> These tests dump the flows currently in the datapath but they aren't
> the first to run and might have existing flows left over. We don't
> really care if there are others flows present so filter on the ones
> we want to avoid being affected by the timing of flow eviction.
>
> Signed-off-by: Jesse Gross <jesse@kernel.org>

LGTM

Acked-by: Pravin B Shelar <pshelar@ovn.org>
Jesse Gross Aug. 18, 2016, 11:54 p.m. UTC | #2
On Thu, Aug 18, 2016 at 4:36 PM, pravin shelar <pshelar@ovn.org> wrote:
> On Thu, Aug 18, 2016 at 12:26 PM, Jesse Gross <jesse@kernel.org> wrote:
>> These tests dump the flows currently in the datapath but they aren't
>> the first to run and might have existing flows left over. We don't
>> really care if there are others flows present so filter on the ones
>> we want to avoid being affected by the timing of flow eviction.
>>
>> Signed-off-by: Jesse Gross <jesse@kernel.org>
>
> LGTM
>
> Acked-by: Pravin B Shelar <pshelar@ovn.org>

Thanks, I applied this to master and branch-2.6.
diff mbox

Patch

diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at
index e47eb50..c213a85 100644
--- a/tests/tunnel-push-pop-ipv6.at
+++ b/tests/tunnel-push-pop-ipv6.at
@@ -157,7 +157,7 @@  icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30
 AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  5'], [0], [dnl
   port  5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
 ])
-AT_CHECK([ovs-appctl dpif/dump-flows int-br], [0], [dnl
+AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl
 tunnel(tun_id=0x7b,ipv6_src=2001:cafe::92,ipv6_dst=2001:cafe::88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),skb_mark(0),recirc_id(0),in_port(6081),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,slow_path(controller))
 ])
 
diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at
index ee29594..8245bf1 100644
--- a/tests/tunnel-push-pop.at
+++ b/tests/tunnel-push-pop.at
@@ -162,7 +162,7 @@  icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30
 AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  5'], [0], [dnl
   port  5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
 ])
-AT_CHECK([ovs-appctl dpif/dump-flows int-br], [0], [dnl
+AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl
 tunnel(tun_id=0x7b,src=1.1.2.92,dst=1.1.2.88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),skb_mark(0),recirc_id(0),in_port(6081),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,slow_path(controller))
 ])