[ovs-dev] [PATCH ovn] ovn-controller.at: Fix occasionally failing unit test.

Mark Michelson mmichels at redhat.com
Fri Jan 8 19:57:20 UTC 2021


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

On 1/7/21 6:26 AM, Dumitru Ceara wrote:
> Test "ovn-controller - Chassis other_config" occasionally fails because
> it assumes the order of Encaps is always "geneve" first.  There is
> however no guarantee for the iteration order of OVSDB records and in
> some cases "vxlan" is returned as first Encap generating a slightly
> different error message.
> 
> The purpose of the test is to detect the constraint violation so we can
> relax the grep match.
> 
> Fixes: fc359bfe9342 ("chassis: Do not try to guess system-id changes.")
> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> ---
>   tests/ovn-controller.at | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at
> index 1b46799..d2a2a8d 100644
> --- a/tests/ovn-controller.at
> +++ b/tests/ovn-controller.at
> @@ -195,7 +195,7 @@ sysid=${sysid}-foo
>   ovs-vsctl set Open_vSwitch . external-ids:system-id="${sysid}"
>   
>   OVS_WAIT_UNTIL([
> -    grep -q 'Transaction causes multiple rows in \\"Encap\\" table to have identical values (geneve and \\"192.168.0.1\\") for index on columns \\"type\\" and \\"ip\\".' hv/ovn-controller.log
> +    grep -q 'Transaction causes multiple rows in \\"Encap\\" table to have identical values' hv/ovn-controller.log
>   ])
>   
>   # Destroy the stale entries manually and ovn-controller should now be able
> 



More information about the dev mailing list