tests: Strip more variable output from conntrack output.
[cascardo/ovs.git] / tests / system-common-macros.at
index f0da589..7836f65 100644 (file)
@@ -122,10 +122,16 @@ m4_define([FORMAT_PING], [grep "transmitted" | sed 's/time.*ms$/time 0ms/'])
 # FORMAT_CT()
 #
 # Strip content from the piped input which would differ from test to test.
-#
+# Strip also content that depends on the system setup (accounting,
+# timestamping)
 m4_define([FORMAT_CT],
     [[grep "dst=$1" | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/  */ /g' \
                           -e 's/secctx[^ ]* //' \
+                          -e 's/packets=[^ ]* //' \
+                          -e 's/bytes=[^ ]* //' \
+                          -e 's/packets=[^ ]* //' \
+                          -e 's/bytes=[^ ]* //' \
+                          -e 's/delta-time=[^ ]* //' \
                           -e 's/id=[0-9]*/id=<cleared>/g' \
                     | cut -d' ' -f4- | sort | uniq]])