Test was waiting for SB changes and then verifying that some flows were
properly generated by OVN, but w/o ensuring OVN did run.

Fixes: 1dd27ea7aea4 ("Provide the option to pin ovn-controller and ovn-northd 
to a specific version.")
Signed-off-by: Xavier Simonart <[email protected]>

---
v2: - Rebased on origin/main
    - Fixed based on Dumitru's review i.e. move ovs-ofctl dump-flows inside 
OVS_WAIT_FOR_OUTPUT
---
 tests/ovn.at | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index 286395298..7e4f78b8f 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -33029,9 +33029,12 @@ check ovs-vsctl set interface vif2 
external_ids:iface-id=foo
 # is not true.
 wait_row_count Port_Binding 1 logical_port=sw0-p2 'chassis=[[]]'
 
-as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
 AT_CAPTURE_FILE([offlows_table0.txt])
-AT_CHECK_UNQUOTED([grep -c "in_port=2" offlows_table0.txt], [1], [dnl
+
+# Wait for flow - note that we can't use ovn-nbctl sync as northd is stopped.
+OVS_WAIT_FOR_OUTPUT([
+as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
+grep -c "in_port=2" offlows_table0.txt], [1], [dnl
 0
 ])
 
@@ -33063,9 +33066,10 @@ check ovn-sbctl set SB_Global . 
options:northd_internal_version=$northd_version
 # It should claim sw0-p2
 wait_row_count Port_Binding 1 logical_port=sw0-p2 chassis=$ch
 
-as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
 AT_CAPTURE_FILE([offlows_table0.txt])
-AT_CHECK_UNQUOTED([grep -c "in_port=2" offlows_table0.txt], [0], [dnl
+OVS_WAIT_FOR_OUTPUT([
+as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
+grep -c "in_port=2" offlows_table0.txt], [0], [dnl
 1
 ])
 
@@ -33109,9 +33113,10 @@ as hv1
 check ovs-vsctl set open . external_ids:ovn-remote=$ovn_remote
 
 wait_row_count Port_Binding 1 logical_port=sw0-p2 'chassis=[[]]'
-as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
 AT_CAPTURE_FILE([offlows_table0.txt])
-AT_CHECK_UNQUOTED([grep -c "in_port=2" offlows_table0.txt], [1], [dnl
+OVS_WAIT_FOR_OUTPUT([
+as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG > 
offlows_table0.txt
+grep -c "in_port=2" offlows_table0.txt], [1], [dnl
 0
 ])
 
-- 
2.47.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to