[ovs-dev] [PATCH ovn 3/4] ovn.at: Fix test "No ovn-controller assert when generating conjunction flows -- ovn-northd-ddlog".

Mark Michelson mmichels at redhat.com
Fri Jun 11 18:25:01 UTC 2021


Acked-by: Mark Michelson <mmichels at redhat.com>

I initially was going to ask that you use the same method for 
determining datapath key as you used in patch 4. However, since this 
test is meant to test that an assertion is not hit, it's not as 
important to painstakingly check the datapath key's correctness in the 
flows.

On 6/11/21 2:24 AM, Han Zhou wrote:
> The test fails quite often for ddlog because of tunnel keys mismatch when
> checking OpenFlow dumps. It is possible to allocate different keys in
> different runs because multiple NB changes can be handled by northd in a
> single iteration - it fails more often in ddlog probably because there
> is some more latency for northd-ddlog to start processing the changes,
> but it doesn't affect correctness. So this patch fixes it by ignoring
> the tunnel keys when comparing the flows.
> 
> Signed-off-by: Han Zhou <hzhou at ovn.org>
> ---
>   tests/ovn.at | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 847c31de6..b440f5517 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -25453,7 +25453,8 @@ check ovn-nbctl --wait=hv sync
>   # Check OVS flows are installed properly.
>   AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \
>       grep "priority=2002" | grep conjunction | \
> -    sed 's/conjunction([[^)]]*)/conjunction()/g' | sort], [0], [dnl
> +    sed 's/conjunction([[^)]]*)/conjunction()/g' | \
> +    sed 's/reg15=0x[[1-9]]/reg15=0xN/g' | sort], [0], [dnl
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000 actions=conjunction()
> @@ -25470,8 +25471,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 actions=conjunction()
> - table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> - table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> + table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> + table=44, priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000 actions=conjunction()
> @@ -25488,8 +25489,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000 actions=conjunction()
>    table=44, priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 actions=conjunction()
> - table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> - table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> + table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
> + table=44, priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 actions=conjunction()
>   ])
>   
>   OVN_CLEANUP([hv1])
> 



More information about the dev mailing list