[ovs-dev] [PATCH] cfm: Add test for fault_override
Alex Wang
alexw at nicira.com
Fri Dec 13 23:35:32 UTC 2013
Looks good to me, tested on bare metal and vm,
Could you add commit message to summarize the test? (especially that it
checks the cfm_fault_status update in database)
On Fri, Dec 13, 2013 at 2:46 PM, Joe Stringer <joestringer at nicira.com>wrote:
> Signed-off-by: Joe Stringer <joestringer at nicira.com>
> ---
> tests/cfm.at | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/tests/cfm.at b/tests/cfm.at
> index 9e351d0..8e5917d 100644
> --- a/tests/cfm.at
> +++ b/tests/cfm.at
> @@ -96,4 +96,42 @@ CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count],
> [cfm_flap_count : 2])
> CFM_VSCTL_LIST_IFACE([p1], [cfm_flap_count], [cfm_flap_count : 0])
>
> 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 at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20131213/ea3f41a3/attachment-0003.html>
More information about the dev
mailing list