Handle a v4mapped sender address given us by a proxy. Bug 2855
[exim.git] / test / runtest
index 06e4401154f4d4ae2dbe9b422380ed7d53822145..4a304a8aa5d8eb0d54831722a49bc8f5f07e378c 100755 (executable)
@@ -792,7 +792,7 @@ RESET_AFTER_EXTRA_LINE_READ:
     }
 
   # Port in host address in spool file output from -Mvh
-  s/^(--?host_address) (.*)\.\d+/$1 $2.9999/;
+  s/^(--?host_address) (.*[:.])\d+$/$1 ${2}9999/;
 
   if ($dynamic_socket and $dynamic_socket->opened and my $port = $dynamic_socket->sockport) {
     s/^Connecting to 127\.0\.0\.1 port \K$port/<dynamic port>/;
@@ -964,6 +964,9 @@ RESET_AFTER_EXTRA_LINE_READ:
   # MIME boundaries in RFC3461 DSN messages
   s/\d{8,10}-eximdsn-\d+/NNNNNNNNNN-eximdsn-MMMMMMMMMM/;
 
+  # Cyrus SASL library version differences (rejectlog)
+  s/Cyrus SASL permanent failure: \Kuser not found$/generic failure/;
+
   # ==========================================================
   # Some munging is specific to the specific file types
 
@@ -1075,6 +1078,9 @@ RESET_AFTER_EXTRA_LINE_READ:
     # drop gnutls version strings
     next if /GnuTLS compile-time version: \d+[\.\d]+$/;
     next if /GnuTLS runtime version: \d+[\.\d]+$/;
+    # and unwanted debug
+    next if /^GnuTLS<2>: FIPS140-2 (context is not set|operation mode switched from initial to not-approved)$/;
+    next if /^GnuTLS<3>: ASSERT: sign.c\[_gnutls_sign_is_secure2\]:\d+$/;
 
     # drop openssl version strings
     next if /OpenSSL compile-time version: OpenSSL \d+[\.\da-z]+/;
@@ -1107,6 +1113,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/;
@@ -1290,7 +1300,7 @@ RESET_AFTER_EXTRA_LINE_READ:
       }
 
     # Different builds will have different lookup types included
-    s/^search_type \K\d+ \((\w+)\) quoting -1 \(none\)$/NN ($1) quoting -1 (none)/;
+    s/^\s*search_type \K\d+ \((\w+)\) quoting -1 \(none\)$/NN ($1) quoting -1 (none)/;
 
     # DISABLE_OCSP
     next if /in hosts_requ(est|ire)_ocsp\? (no|yes)/;
@@ -1447,6 +1457,7 @@ RESET_AFTER_EXTRA_LINE_READ:
       next if /^$time_pid?
                  (?: Berkeley\ DB:\s
                    | Probably\ (?:Berkeley\ DB|ndbm|GDBM)
+                   | Using\ tdb
                    | Authenticators:
                    | Lookups(?:\(built-in\))?:
                    | Support\ for:
@@ -2031,7 +2042,7 @@ if (! $message_skip)
 
   foreach $mail (@mails)
     {
-    next if $mail eq "test-mail/oncelog";
+    next if $mail =~ /^test-mail\/oncelog(.(dir|pag|db))?$/;
 
     $saved_mail = substr($mail, 10);               # Remove "test-mail/"
     $saved_mail =~ s/^$parm_caller(\/|$)/CALLER/;  # Convert caller name
@@ -2409,6 +2420,17 @@ if (/^exigrep\s+(.*)/)
   }
 
 
+# The "exiqgrep" command runs exiqgrep on the current spool
+
+if (/^exiqgrep(\s+.*)?/)
+  {
+  run_system("(./eximdir/exiqgrep -E ./eximdir/exim -C $parm_cwd/test-config" . ($1 || '') . ";" .
+    "echo exiqgrep exit code = \$?)" .
+    ">>test-stdout");
+  return 1;
+  }
+
+
 # The "eximstats" command runs eximstats on the current mainlog
 
 if (/^eximstats\s+(.*)/)
@@ -3791,7 +3813,7 @@ if (defined $parm_lookups{dbm} && not cp("$parm_exim_dir/exim_dbmbuild", "eximdi
   $dbm_build_deleted = 1;
   }
 
-foreach my $tool (qw(exim_dumpdb exim_lock exinext exigrep eximstats)) {
+foreach my $tool (qw(exim_dumpdb exim_lock exinext exigrep eximstats exiqgrep)) {
   cp("$parm_exim_dir/$tool" => "eximdir/$tool")
     or tests_exit(-1, "Failed to make a copy of $tool: $!");
 }
@@ -3799,7 +3821,7 @@ foreach my $tool (qw(exim_dumpdb exim_lock exinext exigrep eximstats)) {
 # Collect some version information
 print '-' x 78, "\n";
 print "Perl version for runtest: $]\n";
-foreach (map { "./eximdir/$_" } qw(exigrep exinext eximstats)) {
+foreach (map { "./eximdir/$_" } qw(exigrep exinext eximstats exiqgrep)) {
   # fold (or unfold?) multiline output into a one-liner
   print join(', ', map { chomp; $_ } `$_ --version`), "\n";
 }