[ovs-dev] [PATCH] rstp.at: Fix intermittent test failure.
Gurucharan Shetty
shettyg at nicira.com
Thu Sep 25 19:39:46 UTC 2014
On Thu, Sep 25, 2014 at 8:51 AM, Alex Wang <alexw at nicira.com> wrote:
> Sub-test "RSTP - dummy interface" checks the ovs-vswitchd.log
> output immediately after command execution. The check may
> fail if the write of new log is delayed by the IO thread.
>
> This commit fixes the above issue by waiting for the
> ovs-vswitchd.log output.
>
> Signed-off-by: Alex Wang <alexw at nicira.com>
This clearly fixes a couple of problems for Linux. So
Acked-by: Gurucharan Shetty <gshetty at nicira.com>
I still see failures on Windows without a time/warp. I will look into
it and send in a separate patch.
> ---
> tests/rstp.at | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/rstp.at b/tests/rstp.at
> index 3f56931..5caa84f 100644
> --- a/tests/rstp.at
> +++ b/tests/rstp.at
> @@ -213,6 +213,7 @@ AT_CHECK([ovs-ofctl add-flow br1 "in_port=2 icmp actions=8"])
>
> AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])
>
> +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 2])
> AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
> port p1: RSTP state changed from Disabled to Discarding
> port p2: RSTP state changed from Disabled to Discarding
> @@ -232,6 +233,7 @@ AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2 up], [], [dnl
> OK
> ])
>
> +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 4])
> AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
> port p1: RSTP state changed from Disabled to Discarding
> port p2: RSTP state changed from Disabled to Discarding
> --
> 1.7.9.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list