[ovs-dev] [PATCH 2/2] lacp: Give LACP a moment to initialize before testing its state, in tests.

Ben Pfaff blp at nicira.com
Mon Sep 30 20:24:01 UTC 2013


These tests configured LACP and then immediately dumped out its state.
Most of the time, this worked, but there was a brief race window in which
the "negotiated" flag could be missing because this took one pass through
the main loop.  This fixes the problem.

This race may be seen in the failures of tests 11 and 12 here:
https://launchpadlibrarian.net/151884888/buildlog_ubuntu-precise-amd64.openvswitch_2.0~201309300804-1ppa1~precise_FAILEDTOBUILD.txt.gz

Reported-by: Vasiliy Tolstov <v.tolstov at selfip.ru>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 tests/lacp.at |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/lacp.at b/tests/lacp.at
index ffc8996..234cf4d 100644
--- a/tests/lacp.at
+++ b/tests/lacp.at
@@ -6,6 +6,11 @@ OVS_VSWITCHD_START([\
         set Port p1 lacp=active --\
         set Interface p1 type=dummy ])
 
+ovs-appctl time/stop
+ovs-appctl time/warp 100
+ovs-appctl time/warp 100
+ovs-appctl time/warp 100
+
 AT_CHECK([ovs-appctl lacp/show], [0], [dnl
 ---- p1 ----
 	status: active negotiated
@@ -53,6 +58,11 @@ OVS_VSWITCHD_START([dnl
             other_config:lacp-port-priority=222 \
             other_config:lacp-aggregation-key=3333 ])
 
+ovs-appctl time/stop
+ovs-appctl time/warp 100
+ovs-appctl time/warp 100
+ovs-appctl time/warp 100
+
 AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
 AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
 ---- bond ----
-- 
1.7.10.4




More information about the dev mailing list