OpenBSD: use ndbm for hints DBs
[exim.git] / test / runtest
index 10f5e441582d1f844fa68ae68acf0d5c27f3e880..abc22b7bc2319f7ffdb7880801f14d5bbb1f46ba 100755 (executable)
@@ -369,6 +369,10 @@ my($is_mail) = $file =~ /mail/;
 
 $date = "\\d{2}-\\w{3}-\\d{4}\\s\\d{2}:\\d{2}:\\d{2}";
 
+# Debug time & pid
+
+$time_pid = "(?:\\d{2}:\\d{2}:\\d{2}\\s+\\d+\\s)";
+
 # Pattern for matching pids at start of stderr lines; initially something
 # that won't match.
 
@@ -1103,6 +1107,10 @@ RESET_AFTER_EXTRA_LINE_READ:
     next if /^GnuTLS<2>: Intel (AES|GCM) accelerator was detected/;
     next if /^Added \d{3} certificate authorities/;
     next if /^TLS: not preloading CRL for server/;
+    next if /^GnuTLS<3>: ASSERT: extensions.c\[_gnutls_get_extension/;
+    next if /^GnuTLS<3>: ASSERT: \.\.\/\.\.\/\.\.\/lib\/x509\//;
+    next if /^GnuTLS<2>: Initializing PKCS #11 modules/;
+
 
     # only kevent platforms (FreeBSD, OpenBSD) say this
     next if /^watch dir/;
@@ -1117,28 +1125,28 @@ RESET_AFTER_EXTRA_LINE_READ:
     next if /^TLS: not preloading server certs$/;
 
     # drop lookups
-    next if /^Lookups \(built-in\):/;
-    next if /^Loading lookup modules from/;
-    next if /^Loaded \d+ lookup modules/;
-    next if /^(?:\d\d:\d\d:\d\d \d+ )?Total \d+ lookups/;
+    next if /^$time_pid?(?: Lookups\ \(built-in\):
+                                       | Loading\ lookup\ modules\ from
+                                       | Loaded\ \d+\ lookup\ modules
+                                       | Total\ \d+\ lookups)/x;
 
     # drop compiler information
-    next if /^Compiler:/;
+    next if /^$time_pid?Compiler:/;
 
     # and the ugly bit
     # different libraries will have different numbers (possibly 0) of follow-up
     # lines, indenting with more data
-    if (/^Library version:/) {
+    if (/^$time_pid?Library version:/) {
       while (1) {
        $_ = <IN>;
-       next if /^\s/;
+       next if /^$time_pid?\s/;
        goto RESET_AFTER_EXTRA_LINE_READ;
       }
     }
 
     # drop other build-time controls emitted for debugging
-    next if /^WHITELIST_D_MACROS:/;
-    next if /^TRUSTED_CONFIG_LIST:/;
+    next if /^$time_pid?WHITELIST_D_MACROS:/;
+    next if /^$time_pid?TRUSTED_CONFIG_LIST:/;
 
     # As of Exim 4.74, we log when a setgid fails; because we invoke Exim
     # with -be, privileges will have been dropped, so this will always
@@ -1410,10 +1418,10 @@ RESET_AFTER_EXTRA_LINE_READ:
 
     # Time-only, in debug output
     # we have to handle double lines from the DBOPEN, hence placed down here and /mg
-    s/^\d\d:\d\d:\d\d\s/01:01:01 /mg;
+    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/^(\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;
 
     # When Exim is checking the size of directories for maildir, it uses
@@ -1440,23 +1448,24 @@ RESET_AFTER_EXTRA_LINE_READ:
       # Skip some lines that Exim puts out at the start of debugging output
       # because they will be different in different binaries.
 
-      print MUNGED
-        unless (/^Berkeley DB: / ||
-                /^Probably (?:Berkeley DB|ndbm|GDBM)/ ||
-                /^Authenticators:/ ||
-                /^Lookups:/ ||
-                /^Support for:/ ||
-                /^Routers:/ ||
-                /^Transports:/ ||
-                /^Malware:/ ||
-                /^(?:\d\d:\d\d:\d\d \d+ )?log selectors =/ ||
-                /^cwd=/ ||
-                /^Fixed never_users:/ ||
-               /^Configure owner:/ ||
-                /^Size of off_t:/
-                );
-
-
+      next if /^$time_pid?
+                 (?: Berkeley\ DB:\s
+                   | Probably\ (?:Berkeley\ DB|ndbm|GDBM)
+                   | Authenticators:
+                   | Lookups(?:\(built-in\))?:
+                   | Support\ for:
+                   | Routers:
+                   | Transports:
+                   | Malware:
+                   | log\ selectors\ =
+                   | cwd=
+                   | Fixed\ never_users
+                   | Configure\ owner
+                   | Size\ of\ off_t:
+                 )
+               /x;
+
+      print MUNGED;
       }
 
     next;
@@ -1926,12 +1935,6 @@ $munges =
     { 'mainlog'   => 's/^(.* SMTP protocol synchronization error .* next input=.{8}).*$/$1<suppressed>/',
       'rejectlog' => 's/^(.* SMTP protocol synchronization error .* next input=.{8}).*$/$1<suppressed>/'},
 
-    'debuglog_stdout' =>
-    { 'stdout' => 's/^\d\d:\d\d:\d\d\s+\d+ //;
-                  s/Process \d+ is ready for new message/Process pppp is ready for new message/;
-                 s/^(?:daemon-accept forked for daemon-accept-delivery:|forked delivery process) \K\d+$/pppp/;'
-    },
-
     'timeout_errno' =>         # actual errno differs Solaris vs. Linux
     { 'mainlog' => 's/((?:host|message) deferral .* errno) <\d+> /$1 <EEE> /' },
 
@@ -2313,7 +2316,7 @@ if (/^dump\s+(\S+)/)
                sort { $a->[0] cmp $b->[0] }
                #map  { [ (split)[0] =~ s/\Q$parm_ipv4/ip4.ip4.ip4.ip4/gr, $_ ] }  # this is too modern for 5.10.1
                map  {
-                (my $k = (split)[0]) =~ s/\Q$parm_ipv4/ip4.ip4.ip4.ip4/g;
+                (my $k = (split)[0]) =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/g;
                 [ $k, $_ ]
                }
                do { local $/ = "\n  "; <$in> };
@@ -2334,6 +2337,16 @@ if (/^dump\s+(\S+)/)
                    return $aa cmp $bb;
                    } @temp;
       }
+    elsif ($which eq "seen")
+      {
+      @temp = sort {
+                  (my $aa = $a) =~ s/^([\d.]+)/$1/;
+                  (my $bb = $b) =~ s/^([\d.]+)/$1/;
+                  $aa =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/;
+                  $bb =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/;
+                   return $aa cmp $bb;
+                   } @temp;
+      }
     print $out @temp;
     }
   close($in); # close it explicitly, otherwise $? does not get set