summaryrefslogtreecommitdiff
path: root/test/runtest
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-06-17 11:21:05 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2022-06-17 11:22:15 +0100
commit4da19af657ed2687d20c1eb8cf85a66a70804e2d (patch)
treee171136a86f55c4f2acc62048b916ef45860a64b /test/runtest
parent46cb87a295735ab4452ad1ca304f2c19ded2624c (diff)
Testsuite: pid tracking
Diffstat (limited to 'test/runtest')
-rwxr-xr-xtest/runtest61
1 files changed, 29 insertions, 32 deletions
diff --git a/test/runtest b/test/runtest
index d760a0090..8200a2cd6 100755
--- a/test/runtest
+++ b/test/runtest
@@ -747,7 +747,7 @@ RESET_AFTER_EXTRA_LINE_READ:
s/\bgid=\d+/gid=gggg/;
s/\begid=\d+/egid=gggg/;
- s/\b(pid=|pid |PID: )\d+/$1pppp/;
+ s/\b(?:pid=|pid\s|PID:\s|Process\s|child\s)\K(\d+)/new_value($1, "p%s", \$next_pid)/gxe;
s/\buid=\d+/uid=uuuu/;
s/\beuid=\d+/euid=uuuu/;
s/set_process_info:\s+\d+/set_process_info: pppp/;
@@ -1053,14 +1053,35 @@ RESET_AFTER_EXTRA_LINE_READ:
elsif ($is_stderr)
{
# The very first line of debugging output will vary
-
s/^Exim version .*/Exim version x.yz ..../;
+ # Skip some lines that Exim puts out at the start of debugging output
+ # because they will be different in different binaries.
+
+ next if /^$time_pid?
+ (?: Berkeley\ DB:\s
+ | Probably\ (?:Berkeley\ DB|ndbm|GDBM)
+ | Using\ tdb
+ | Authenticators:
+ | Lookups(?:\(built-in\))?:
+ | Support\ for:
+ | Routers:
+ | Transports:
+ | Malware:
+ | log\ selectors\ =
+ | cwd=
+ | Fixed\ never_users
+ | Configure\ owner
+ | Size\ of\ off_t:
+ )
+ /x;
+
+ # Lines with a leading pid
+ s/^(\d+)\s(?!(?:previous message|in\s))/new_value($1, "p%s", \$next_pid) . ' '/e;
+
# Debugging lines for Exim terminations and process-generation
- s/(?<=^>>>>>>>>>>>>>>>> Exim pid=)\d+(?= terminating)/pppp/;
- s/^(proxy-proc \w{5}-pid) \d+$/$1 pppp/;
- s/^(?:\s*\d+ )(exec .* -oPX)$/pppp $1/;
+ s/^\s*\K(\d+)(?=\sexec\s.*\s-oPX$)/new_value($1, "%s", \$next_pid)/xe;
next if /(?:postfork: | fork(?:ing|ed) for )/;
# IP address lookups use gethostbyname() when IPv6 is not supported,
@@ -1372,7 +1393,7 @@ RESET_AFTER_EXTRA_LINE_READ:
s/Address family not supported by protocol family/Network Error/;
s/Network is unreachable/Network Error/;
}
- next if /^(ppppp )?setsockopt FASTOPEN: Protocol not available$/;
+ next if /^(ppppp |\d+ )?setsockopt FASTOPEN: Protocol not available$/;
s/^(Connecting to .* \.\.\. sending) \d+ (nonTFO early-data)$/$1 dd $2/;
if (/^([0-9: ]* # possible timestamp
@@ -1432,8 +1453,8 @@ RESET_AFTER_EXTRA_LINE_READ:
s/^\d\d:\d\d:\d\d\s+/01:01:01 /mg;
# pid in debug lines
- s/^(\d\d:\d\d:\d\d)(\s+\d+\s)/"$1 " . new_value($2, "%s", \$next_pid) . " "/mgxe;
- s/(?<!post-)[Pp]rocess\K(\s\d+ )/new_value($1, "%s", \$next_pid) . " "/gxe;
+ s/^(\d\d:\d\d:\d\d\s+)(\d+)/$1 . new_value($2, "p%s", \$next_pid) . " "/mgxe;
+ s/(?<!post-)[Pp]rocess\K(\s\d+ )/new_value($1, "p%s", \$next_pid) . " "/gxe;
# When Exim is checking the size of directories for maildir, it uses
# the check_dir_size() function to scan directories. Of course, the order
@@ -1456,27 +1477,6 @@ RESET_AFTER_EXTRA_LINE_READ:
@saved = ();
}
- # Skip some lines that Exim puts out at the start of debugging output
- # because they will be different in different binaries.
-
- next if /^$time_pid?
- (?: Berkeley\ DB:\s
- | Probably\ (?:Berkeley\ DB|ndbm|GDBM)
- | Using\ tdb
- | Authenticators:
- | Lookups(?:\(built-in\))?:
- | Support\ for:
- | Routers:
- | Transports:
- | Malware:
- | log\ selectors\ =
- | cwd=
- | Fixed\ never_users
- | Configure\ owner
- | Size\ of\ off_t:
- )
- /x;
-
print MUNGED;
}
@@ -1918,9 +1918,6 @@ $munges =
'rejectlog' => 's/ X=TLS\S+ / X=TLS_proto_and_cipher /',
},
- 'debug_pid' =>
- { 'stderr' => 's/(^\s{0,4}|(?<=Process )|(?<=child ))\d+/ppppp/g' },
-
'optional_dsn_info' =>
{ 'mail' => '/^(X-(Remote-MTA-(smtp-greeting|helo-response)|Exim-Diagnostic|(body|message)-linecount):|Remote-MTA: X-ip;)/'
},