mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Excluding log fields of name mime_type for comparision.
This is because libmagic can return different results depending on installation. Note, this still doesn't fix all problems: smtp-entities sets md5 depending on the mime-type returned by libmagic ...
This commit is contained in:
parent
3a3f58d5df
commit
cb2cb117d0
3 changed files with 27 additions and 2 deletions
|
@ -2,4 +2,7 @@
|
||||||
#
|
#
|
||||||
# Default canonifier used with the trace-based tests in testing/external/*.
|
# Default canonifier used with the trace-based tests in testing/external/*.
|
||||||
|
|
||||||
`dirname $0`/diff-remove-timestamps | `dirname $0`/diff-remove-uids
|
`dirname $0`/diff-remove-timestamps \
|
||||||
|
| `dirname $0`/diff-remove-uids \
|
||||||
|
| `dirname $0`/diff-remove-mime-types \
|
||||||
|
| `dirname $0`/diff-remove-abspath
|
||||||
|
|
22
testing/scripts/diff-remove-mime-types
Executable file
22
testing/scripts/diff-remove-mime-types
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#! /usr/bin/awk -f
|
||||||
|
#
|
||||||
|
# A diff canonifier that removes all MIME types because libmagic output
|
||||||
|
# can differ between installations.
|
||||||
|
|
||||||
|
BEGIN { FS="\t"; OFS="\t"; column = -1; }
|
||||||
|
|
||||||
|
/^#fields/ {
|
||||||
|
for ( i = 2; i < NF; ++i )
|
||||||
|
if ( $i == "mime_type" )
|
||||||
|
column = i-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
column >= 0 {
|
||||||
|
if ( $column != "-" )
|
||||||
|
# Mark that it's set, but ignore content.
|
||||||
|
$column = "+";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
print;
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# A diff canonifier that removes all connection UIDs.
|
# A diff canonifier that removes all connection UIDs.
|
||||||
|
|
||||||
BEGIN { IFS="\t"; OFS="\t"; }
|
BEGIN { FS="\t"; OFS="\t"; }
|
||||||
|
|
||||||
column > 0 {
|
column > 0 {
|
||||||
$column = "XXXXXXXXXXX";
|
$column = "XXXXXXXXXXX";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue