Looks good to me, thx,
On Mon, Dec 16, 2013 at 10:08 AM, Joe Stringer <joestrin...@nicira.com>wrote: > This patch adds tests for the cfm fault_override feature which can be > set through "ovs-appctl cfm/set-fault <port> <value>". It brings up two > ports with CFM, sets a fault, then checks that the fault status has > propagated correctly to the CFM module and the database. Finally, it > sets the fault override behaviour to normal and checks that the fault > has gone away. > > Signed-off-by: Joe Stringer <joestrin...@nicira.com> > --- > v2: Flesh out commit message > --- > tests/cfm.at | 38 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/tests/cfm.at b/tests/cfm.at > index 9f9591d..7ab4354 100644 > --- a/tests/cfm.at > +++ b/tests/cfm.at > @@ -95,4 +95,42 @@ for i in `seq 0 10`; do ovs-appctl time/warp 100; done > CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count : 2]) > > OVS_VSWITCHD_STOP > +AT_CLEANUP > + > +AT_SETUP([cfm - fault_override]) > +OVS_VSWITCHD_START([add-br br1 -- \ > + set bridge br1 datapath-type=dummy \ > + other-config:hwaddr=aa:55:aa:56:00:00 -- \ > + add-port br1 p1 -- set Interface p1 type=patch \ > + options:peer=p0 -- \ > + add-port br0 p0 -- set Interface p0 type=patch \ > + options:peer=p1 -- \ > + set Interface p0 cfm_mpid=1 > other_config:cfm_interval=100 other_config:cfm_extended=true -- \ > + set Interface p1 cfm_mpid=2 > other_config:cfm_interval=100 other_config:cfm_extended=true]) > + > +ovs-appctl time/stop > +# wait for a while to stablize cfm. > +for i in `seq 0 100`; do ovs-appctl time/warp 100; done > +CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up]) > +CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up]) > +AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override'], [1], [ignore]) > +CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status : > [[]]]) > + > +# set a fault and see that this is shown in the CFM module and the > database > +AT_CHECK([ovs-appctl cfm/set-fault p1 true], [0], [OK > +]) > +AT_CHECK([ovs-appctl time/warp 100], [0], [ignore]) > +AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override' | sed -e 's/MPID > [[0-9]]*: extended //'], [0], [dnl > +fault_override > +]) > +CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status : > [[override]]]) > + > +# reset and see that it returned to normal > +AT_CHECK([ovs-appctl cfm/set-fault normal], [0], [OK > +]) > +AT_CHECK([ovs-appctl time/warp 100], [0], [ignore]) > +AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override'], [1], [ignore]) > +CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status : > [[]]]) > + > +OVS_VSWITCHD_STOP > AT_CLEANUP > \ No newline at end of file > -- > 1.7.9.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev