The difference between machines may cause the test to fail. This patch has been tested on centos 7.2 (kernel 3.10.0, python 2.7.5 and gcc 4.8.5) and ubuntu 16.04 (kernel 4.4.0, python 3.5.2 and 5.4.0). This patch may make the stp test more stable.
Fixes: 427e9751f300 ("tests: Add and improve stp tests.") Reported-at: http://paste.ubuntu.com/24215426 Signed-off-by: nickcooper-zhangtonghao <n...@opencloud.tech> --- tests/stp.at | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/stp.at b/tests/stp.at index 20f7940..542e700 100644 --- a/tests/stp.at +++ b/tests/stp.at @@ -377,6 +377,11 @@ grep 'STP state change' | sed ' s/.*ofproto_dpif|.*|port .*:/port <>:/ ']]) +m4_define([FILTER_STP_TOPOLOGY_LISTENING], [[ +grep 'disabled to listening' | sed ' + s/.*ofproto_dpif|.*|port .*:/port <>:/ +']]) + m4_define([FILTER_STP_TOPOLOGY_FORWARDING], [[ grep 'learning to forwarding' | sed ' s/.*ofproto_dpif|.*|port .*:/port <>:/ @@ -427,7 +432,7 @@ AT_CHECK([ovs-ofctl add-flow br1 "in_port=2 icmp actions=8"]) ovs-appctl time/warp 3000 ovs-appctl time/warp 3000 -AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl +AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl port <>: STP state changed from disabled to listening port <>: STP state changed from disabled to listening ]) @@ -520,7 +525,7 @@ ovs-appctl time/stop ovs-appctl time/warp 3000 ovs-appctl time/warp 3000 -AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl +AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl port <>: STP state changed from disabled to listening port <>: STP state changed from disabled to listening port <>: STP state changed from disabled to listening -- 1.8.3.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev