ofp-print: Abbreviate duplicated table features.
[cascardo/ovs.git] / tests / ofp-print.at
index 83c7b9e..3b4a4e8 100644 (file)
@@ -1466,7 +1466,9 @@ AT_CLEANUP
 
 AT_SETUP([OFPST_TABLE reply - OF1.2])
 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-(tail="
+(echo 'OFPST_TABLE reply (OF1.2) (xid=0x2):
+  table 0 ("classifier"):
+    active=1, lookup=74614, matched=106024
     config=controller
     max_entries=1000000
     instructions (table miss and others):
@@ -1508,21 +1510,18 @@ AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
       icmpv6_code: exact match or wildcard
       nd_target: exact match or wildcard
       nd_sll: exact match or wildcard
-      nd_tll: exact match or wildcard"
- echo "OFPST_TABLE reply (OF1.2) (xid=0x2):
-  table 0 (\"classifier\"):
-    active=1, lookup=74614, matched=106024$tail"
- x=1
- while test $x -lt 254; do
-   printf "
-  table %d (\"%s\"):
-    active=0, lookup=0, matched=0$tail
-" $x table$x
-   x=`expr $x + 1`
+      nd_tll: exact match or wildcard
+
+  table 1 ("table1"):
+    active=0, lookup=0, matched=0
+    (same features)
+'
+ for i in `seq 2 253`; do
+     printf '  table %d ("table%d"): ditto\n' $i $i
  done
- echo "
-  table 254 (\"table254\"):
-    active=2, lookup=0, matched=0$tail") > expout
+ echo '  table 254 ("table254"):
+    active=2, lookup=0, matched=0
+    (same features)') > expout
 
 (pad32="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  pad7="00 00 00 00 00 00 00 "
@@ -2752,6 +2751,33 @@ NXT_SET_ASYNC_CONFIG (xid=0x0):
 ])
 AT_CLEANUP
 
+AT_SETUP([OFPT_SET_ASYNC_CONFIG])
+AT_KEYWORDS([ofp-print])
+AT_CHECK([ovs-ofctl ofp-print "\
+05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \
+00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
+00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
+00 05 00 08 00 00 00 05 \
+"], [0], [dnl
+OFPT_SET_ASYNC (OF1.4) (xid=0x2):
+ master:
+       PACKET_IN: action
+     PORT_STATUS: add modify
+    FLOW_REMOVED: idle delete
+     ROLE_STATUS: (off)
+    TABLE_STATUS: (off)
+  REQUESTFORWARD: (off)
+
+ slave:
+       PACKET_IN: no_match invalid_ttl
+     PORT_STATUS: delete
+    FLOW_REMOVED: delete group_delete meter_delete
+     ROLE_STATUS: (off)
+    TABLE_STATUS: (off)
+  REQUESTFORWARD: (off)
+])
+AT_CLEANUP
+
 AT_SETUP([NXT_SET_CONTROLLER_ID])
 AT_KEYWORDS([ofp-print])
 AT_CHECK([ovs-ofctl ofp-print "\
@@ -3247,11 +3273,13 @@ AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - reject OFPT_HELLO])
 AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
 05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
 05 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 \
 "], [0], [dnl
 OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_UNSUP***
+], [dnl
+ofp_util|WARN|OFPT_HELLO message not allowed inside OFPT14_BUNDLE_ADD_MESSAGE
 ])
 AT_CLEANUP