X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fofproto.at;h=27b6b34c4fe8ea0de055e2f50dbc3c43d0ae3566;hb=3388e51a73f6f6539f83980270a4f31592928b7e;hp=9f3a67fd60674b3f3702141814cfdda648247a1b;hpb=433702fcc8e3309cb1f880d7a0f48c1b0ac18cac;p=sliver-openvswitch.git diff --git a/tests/ofproto.at b/tests/ofproto.at index 9f3a67fd6..27b6b34c4 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -243,6 +243,34 @@ 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 - flow mod checks group availability]) +OVS_VSWITCHD_START +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 group_id=1234,type=all,bucket=output:10]) +AT_DATA([flows.txt], [dnl +tcp actions=group:1234 +udp actions=group:1235 +]) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=group:1234']) +AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=group:1235'], [1], [], [stderr]) + +# The output should look like this: +# +# 00000000 02 0e 00 98 00 00 00 02-00 00 00 00 00 00 00 00 |................| +# 00000010 00 00 00 00 00 00 00 00-ff 00 00 00 00 00 80 00 |................| +# 00000020 ff ff ff ff ff ff ff ff-ff ff ff ff 00 00 00 00 |................| +# 00000030 00 00 00 58 00 00 00 00-00 00 03 d7 00 00 00 00 |...X............| +# +# This 'sed' command captures the error message but drops details. +AT_CHECK([sed '/truncated/d +/^000000.0/d' stderr | STRIP_XIDS], [0], + [OFPT_ERROR (OF1.1): OFPBAC_BAD_OUT_GROUP +OFPT_FLOW_MOD (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]) @@ -278,7 +306,7 @@ AT_CHECK([STRIP_XIDS stdout], [0], [dnl OFPST_GROUP_FEATURES reply (OF1.2): Group table: Types: 0x0 - Capabilities: 0x4 + Capabilities: 0x7 ]) OVS_VSWITCHD_STOP AT_CLEANUP