From bf24a5f9cd5965767e040d2b3245a7fb289601c6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 17 Dec 2013 14:14:52 -0800 Subject: [PATCH] lacp: Give LACP a moment to initialize before testing its state, in tests. 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 Signed-off-by: Ben Pfaff Acked-by: Andy Zhou --- tests/lacp.at | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/lacp.at b/tests/lacp.at index ede7c8fc2..d44bee0e8 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: /' < stdout], [0], [dnl ---- bond ---- -- 2.43.0