system-traffic: Add IP fragmentation expiry tests.
[cascardo/ovs.git] / tests / ofproto-macros.at
index bb3e9ee..c6c3321 100644 (file)
@@ -230,12 +230,24 @@ ovn_populate_arp() {
         done
     done
 }
+
+# Strips 'xid=0x1234' from ovs-ofctl output.
+strip_xids () {
+    sed 's/ (xid=0x[[0-9a-fA-F]]*)//'
+}
+
+# Changes all 'used:...' to say 'used:0.0', to make output easier to compare.
+strip_used () {
+    sed 's/used:[[0-9]]\.[[0-9]]*/used:0.0/'
+}
+
+# Strips 'ufid:...' from output, to make it easier to compare.
+# (ufids are random.)
+strip_ufid () {
+    sed 's/ufid:[[-0-9a-f]]* //'
+}
 m4_divert_pop([PREPARE_TESTS])
 
-m4_define([STRIP_XIDS], [[sed 's/ (xid=0x[0-9a-fA-F]*)//']])
-m4_define([STRIP_DURATION], [[sed 's/\bduration=[0-9.]*s/duration=?s/']])
-m4_define([STRIP_USED], [[sed 's/used:[0-9]\.[0-9]*/used:0.0/']])
-m4_define([STRIP_UFID], [[sed 's/ufid:[-0-9a-f]* //']])
 m4_define([TESTABLE_LOG], [-vPATTERN:ANY:'%c|%p|%m'])
 
 # _OVS_VSWITCHD_START([vswitchd-aux-args])
@@ -326,8 +338,8 @@ check_logs () {
 add_of_ports () {
     local args
     local br=$1; shift
-    for $pnum; do
-        AS_VAR_APPEND([args], [" -- $br p$pnum -- set Interface p$pnum type=dummy ofport_request=$pnum"])
+    for pnum; do
+        AS_VAR_APPEND([args], [" -- add-port $br p$pnum -- set Interface p$pnum type=dummy ofport_request=$pnum"])
     done
     ovs-vsctl $args
 }