diff mbox series

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

Message ID 1610018819-3107-1-git-send-email-dceara@redhat.com
State Accepted
Headers show
Series [ovs-dev] ovn-controller.at: Fix occasionally failing unit test. | expand

Commit Message

Dumitru Ceara Jan. 7, 2021, 11:26 a.m. UTC
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@redhat.com>
---
 tests/ovn-controller.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Michelson Jan. 8, 2021, 7:57 p.m. UTC | #1
Acked-by: Mark Michelson <mmichels@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@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
>
Numan Siddique Jan. 12, 2021, 10:27 a.m. UTC | #2
On Sat, Jan 9, 2021 at 1:27 AM Mark Michelson <mmichels@redhat.com> wrote:

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

Thanks.

I applied this patch to master.

Numan


>
> 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@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
> >
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Dumitru Ceara Jan. 12, 2021, 10:30 a.m. UTC | #3
On 1/12/21 11:27 AM, Numan Siddique wrote:
> 
> 
> On Sat, Jan 9, 2021 at 1:27 AM Mark Michelson <mmichels@redhat.com
> <mailto:mmichels@redhat.com>> wrote:
> 
>     Acked-by: Mark Michelson <mmichels@redhat.com
>     <mailto:mmichels@redhat.com>>
> 
> 
> Thanks.
> 
> I applied this patch to master.
> 
> Numan
>  

Thanks, Mark and Numan!

Regards,
Dumitru
diff mbox series

Patch

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