diff mbox series

[ovs-dev,v2,5/5] tests: wait for all flows to be installed before sending packets

Message ID 20231023092231.3861122-6-xsimonar@redhat.com
State Accepted
Delegated to: Dumitru Ceara
Headers show
Series Fixed another set of flaky Unit Tests | 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 success github build: passed

Commit Message

Xavier Simonart Oct. 23, 2023, 9:22 a.m. UTC
Remote output flows are setup when binding of remote port is received.
Hence those flows can be setup after ports have been reported up.

- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS
- 3 HVs, 3 LS, 3 lports/LS, 1 LR
- 2 HVs, 2 LRs connected via LS, gateway router

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>

---
v2: rebased on origin/main
---
 tests/ovn.at | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 3ce273a55..47f586e1d 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -4671,6 +4671,12 @@  OVN_POPULATE_ARP
 
 wait_for_ports_up
 check ovn-nbctl --wait=hv sync
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv_gw"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv_gw"],["hv1"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv_gw"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv_gw"],["hv2"])
 
 # test_packet INPORT DST SRC ETHTYPE OUTPORT...
 #
@@ -4870,6 +4876,13 @@  check ovn-nbctl --wait=hv sync
 # for ARP resolution).
 OVN_POPULATE_ARP
 
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv3"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv2"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv3"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv1"])
+
 # test_ip INPORT SRC_MAC DST_MAC SRC_IP DST_IP OUTPORT...
 #
 # This shell function causes a packet to be received on INPORT.  The packet's
@@ -7646,6 +7659,9 @@  ovn-nbctl lsp-add alice alice1 \
 wait_for_ports_up
 check ovn-nbctl --wait=hv sync
 
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"])
+OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"])
+
 # Send ip packets between foo1 and alice1
 src_mac="f00000010203"
 dst_mac="000001010203"