From: Simon Horman Date: Wed, 30 Oct 2013 09:17:16 +0000 (+0900) Subject: ofproto: Add del groups test X-Git-Tag: sliver-openvswitch-2.0.90-1~6^2~12 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=433702fcc8e3309cb1f880d7a0f48c1b0ac18cac ofproto: Add del groups test Lightly exercise del-groups Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- diff --git a/tests/ofproto.at b/tests/ofproto.at index 13a596ced..9f3a67fd6 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -174,6 +174,88 @@ OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2) (xid=0x2): port=10 OVS_VSWITCHD_STOP AT_CLEANUP +dnl This is really bare-bones. +dnl It at least checks request and reply serialization and deserialization. +AT_SETUP([ofproto - del group]) +OVS_VSWITCHD_START +AT_DATA([groups.txt], [dnl +group_id=1234,type=all,bucket=output:10 +group_id=1235,type=all,bucket=output:10 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout]) +AT_CHECK([STRIP_XIDS stdout], [0], [dnl +OFPST_GROUP_DESC reply (OF1.1): + group_id=1235,type=all,bucket=actions=output:10 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout]) +AT_CHECK([STRIP_XIDS stdout], [0], [dnl +OFPST_GROUP_DESC reply (OF1.1): + group_id=1235,type=all,bucket=actions=output:10 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0], [0]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout]) +AT_CHECK([STRIP_XIDS stdout], [0], [dnl +OFPST_GROUP_DESC reply (OF1.1): +]) +OVS_VSWITCHD_STOP +AT_CLEANUP + +dnl This is really bare-bones. +dnl It at least checks request and reply serialization and deserialization. +AT_SETUP([ofproto - del group deletes flows]) +OVS_VSWITCHD_START +AT_DATA([groups.txt], [dnl +group_id=1234,type=all,bucket=output:10 +group_id=1235,type=all,bucket=output:10 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt]) +AT_DATA([flows.txt], [dnl +tcp actions=group:1234 +udp actions=group:1235 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flows br0 flows.txt]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort], +[0], [dnl + tcp actions=group:1234 + udp actions=group:1235 +OFPST_FLOW reply (OF1.1): +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort], +[0], [dnl + udp actions=group:1235 +OFPST_FLOW reply (OF1.1): +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort], +[0], [dnl + udp actions=group:1235 +OFPST_FLOW reply (OF1.1): +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort], +[0], [dnl +OFPST_FLOW reply (OF1.1): +]) +OVS_VSWITCHD_STOP +AT_CLEANUP + +dnl This is really bare-bones. +dnl It at least checks request and reply serialization and deserialization. +AT_SETUP([ofproto - group description]) +OVS_VSWITCHD_START +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 group_id=1234,type=all,bucket=output:10], [0], [stdout]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout]) +AT_CHECK([STRIP_XIDS stdout], [0], [dnl +OFPST_GROUP_DESC reply (OF1.1): + group_id=1234,type=all,bucket=actions=output:10 +]) +OVS_VSWITCHD_STOP +AT_CLEANUP + dnl This is really bare-bones. dnl It at least checks request and reply serialization and deserialization. AT_SETUP([ofproto - group description])