diff mbox series

[ovs-dev,5/5] tests: fixed race_condition with max_prefix

Message ID 20231103134257.441166-6-xsimonar@redhat.com
State Accepted
Delegated to: Dumitru Ceara
Headers show
Series More unit tests fixes | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Xavier Simonart Nov. 3, 2023, 1:42 p.m. UTC
The following tests:
- ipam
- ipam connectivity
- ipam to non-ipam
set the mac_prefix using nbctl.
However, it can happen that both northd and nbctl sets the mac_prefix
at the same time, which might result in the mac_prefix from nbctl to
be dropped.

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 tests/ovn.at | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index a855392fc..1f75f8c08 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -8408,6 +8408,7 @@  check_dynamic_addresses() {
     check_row_count nb:Logical_Switch_Port 1 name="$1" dynamic_addresses="$arg"
 }
 
+check ovn-nbctl --wait=sb sync
 # Add a port to a switch that does not have a subnet set, then set the
 # subnet which should result in an address being allocated for the port.
 ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
@@ -8723,7 +8724,7 @@  OVN_FOR_EACH_NORTHD([
 AT_SETUP([ipam connectivity])
 ovn_start
 
-ovn-nbctl lr-add R1
+ovn-nbctl --wait=sb lr-add R1
 
 # Test for a ping using dynamically allocated addresses.
 ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
@@ -21177,6 +21178,7 @@  OVN_FOR_EACH_NORTHD([
 AT_SETUP([ipam to non-ipam])
 ovn_start
 
+check ovn-nbctl --wait=sb sync
 ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00"
 ovn-nbctl ls-add sw0
 ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic