[ovs-dev] [PATCH ovn] tests: fix flaky "ovn-ic -- gateway sync" test

Vladislav Odintsov odivlad at gmail.com
Thu Oct 7 17:49:53 UTC 2021


Sometimes when ovn-ic daemon was running less quick that usual
(more often in ASAN tests), test 'ovn-ic -- gateway sync'
failed if chassis was not created yet.

This patch fixes such situation by adding await for chassis to
appear.

../../../tests/ovn-ic.at:119: ovn_as az2 ovn-sbctl show | sort -r
--- -	2021-10-07 12:50:45.178529089 +0000
+++ /home/runner/work/ovn/ovn/ovn-21.09.90/_build/sub/tests/testsuite.dir/at-groups/1069/stdout	2021-10-07 12:50:45.169509348 +0000
@@ -1,9 +1 @@
-Chassis gw1
-    hostname: gw1
-    Encap vxlan
-    Encap geneve
-        options: {csum="true"}
-        options: {csum="true"}
-        ip: "192.168.0.1"
-        ip: "192.168.0.1"

1069. ovn-ic.at:119: 1069. ovn-ic -- gateway sync -- ovn-northd -- dp-groups=no (ovn-ic.at:119): FAILED (ovn-ic.at:119)

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
---
 tests/ovn-ic.at | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
index 15560334d..3faa9629a 100644
--- a/tests/ovn-ic.at
+++ b/tests/ovn-ic.at
@@ -129,6 +129,7 @@ ovs-vsctl add-br br-phys
 ovn_az_attach az1 n1 br-phys 192.168.0.1
 ovs-vsctl set open . external-ids:ovn-is-interconn=true external-ids:hostname=gw1
 
+OVS_WAIT_UNTIL([ovn_as az2 ovn-sbctl show | grep "192.168.0.1"])
 AT_CHECK([ovn_as az2 ovn-sbctl show | sort -r], [0], [dnl
 Chassis gw1
     hostname: gw1
-- 
2.30.0



More information about the dev mailing list