STP synchronization takes 30 seconds, which is way too long of a time
to wait in a test, and it's also on an edge of what the macros are
willing to wait for. Stop and warp the time instead. RSTP doesn't
suffer that much, but it's better to use the same pattern in the test.
Also, there should be no reason to wait on disabling STP/RSTP. The
changes should be already applied when ovs-vsctl returns.
Fixes: 332ca1dad732 ("ofproto-dpif: Fix bundle floodable flag when disabling
STP/RSTP.")
Signed-off-by: Ilya Maximets <[email protected]>
---
tests/ofproto-dpif.at | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index efb36e058..930c03f0c 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -13991,11 +13991,16 @@ add_of_ports br0 1 2
AT_CHECK([ovs-ofctl add-flow br0 action=NORMAL])
+AT_CHECK([ovs-appctl time/stop])
+
+# Give time for STP to synchronize.
+AT_CHECK([ovs-appctl time/warp 30000 3000], [0], [ignore])
+
dnl Verify we are in forwarding state.
-OVS_WAIT_UNTIL([ovs-appctl stp/show br0 | grep "p1.*forwarding"])
+AT_CHECK([ovs-appctl stp/show br0 | grep "p1.*forwarding"], [0], [ignore])
AT_CHECK([ovs-vsctl set bridge br0 stp_enable=false])
-OVS_WAIT_UNTIL([test -z "$(ovs-appctl stp/show)"])
+AT_CHECK([ovs-appctl stp/show])
dnl Send a broadcast packet on p2, verify it floods to p1.
AT_CHECK([ovs-appctl ofproto/trace br0 \
@@ -14019,11 +14024,16 @@ add_of_ports br0 1 2
AT_CHECK([ovs-ofctl add-flow br0 action=NORMAL])
+AT_CHECK([ovs-appctl time/stop])
+
+# Give time for RSTP to synchronize.
+AT_CHECK([ovs-appctl time/warp 5000 500], [0], [ignore])
+
dnl Verify we are in forwarding state.
-OVS_WAIT_UNTIL([ovs-appctl rstp/show br0 | grep "p1.*Designated"])
+AT_CHECK([ovs-appctl rstp/show br0 | grep "p1.*Designated"], [0], [ignore])
AT_CHECK([ovs-vsctl set bridge br0 rstp_enable=false])
-OVS_WAIT_UNTIL([test -z "$(ovs-appctl rstp/show)"])
+AT_CHECK([ovs-appctl rstp/show])
dnl Send a broadcast packet on p2, verify it floods to p1.
AT_CHECK([ovs-appctl ofproto/trace br0 \
--
2.55.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev