tests: Strip more variable output from conntrack output.
authorJarno Rajahalme <jrajahalme@nicira.com>
Wed, 4 Nov 2015 23:47:35 +0000 (15:47 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 4 Nov 2015 23:47:35 +0000 (15:47 -0800)
'conntrack' output format varies depending on the system
configuration, i.e., conntrack accounting or timestamping is enabled.
Modify the FORMAT_CT() macro to hide these differences.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
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]])