my $cr = "\r";
my $debug = 0;
my $flavour = do {
- my $f = Exim::Runtest::flavour();
+ my $f = Exim::Runtest::flavour() // '';
(grep { $f eq $_ } Exim::Runtest::flavours()) ? $f : 'FOO';
};
my $force_continue = 0;
my($is_log) = $file =~ /log/;
my($is_stdout) = $file =~ /stdout/;
my($is_stderr) = $file =~ /stderr/;
+my($is_mail) = $file =~ /mail/;
# Date pattern
s?prvs=([^/]+)/[\da-f]{10}@?prvs=$1/xxxxxxxxxx@?g; # Old form
s?prvs=[\da-f]{10}=([^@]+)@?prvs=xxxxxxxxxx=$1@?g; # New form
- # Error lines on stdout from SSL contain process id values and file names.
- # They also contain a source file name and line number, which may vary from
- # release to release.
- s/^\d+:error:/pppp:error:/;
- s/:(?:\/[^\s:]+\/)?([^\/\s]+\.c):\d+:/:$1:dddd:/;
-
# There are differences in error messages between OpenSSL versions
s/SSL_CTX_set_cipher_list/SSL_connect/;
}
}
+ # remote IPv6 addrs vary
+ s/^(Connection request from) \[.*:.*:.*\]$/$1 \[ipv6\]/;
+
# openssl version variances
- next if /^SSL info: unknown state/;
- next if /^SSL info: SSLv2\/v3 write client hello A/;
- next if /^SSL info: SSLv3 read server key exchange A/;
+ # Error lines on stdout from SSL contain process id values and file names.
+ # They also contain a source file name and line number, which may vary from
+ # release to release.
+
+ next if /^SSL info:/;
next if /SSL verify error: depth=0 error=certificate not trusted/;
s/SSL3_READ_BYTES/ssl3_read_bytes/i;
+ s/^\d+:error:\d+(:SSL routines:ssl3_read_bytes:[^:]+:).*(:SSL alert number \d\d)$/pppp:error:dddddddd$1\[...\]$2/;
# gnutls version variances
next if /^Error in the pull function./;
+
+ # optional IDN2 variant conversions. Accept either IDN1 or IDN2
+ s/conversion strasse.de/conversion xn--strae-oqa.de/;
+ s/conversion: german.xn--strae-oqa.de/conversion: german.straße.de/;
}
# ======== stderr ========
# Not all platforms build with DKIM enabled
next if /^PDKIM >> Body data for hash, canonicalized/;
+ # Parts of DKIM-specific debug output depend on the time/date
+ next if /^date:\w+,{SP}/;
+ next if /^PDKIM \[[^[]+\] (Header hash|b) computed:/;
+
# Not all platforms support TCP Fast Open, and the compile omits the check
if (s/\S+ in hosts_try_fastopen\? no \(option unset\)\n$//)
{
close(OUT);
print("Probing with config file: $parm_cwd/test-config\n");
-open(EXIMINFO, "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd " .
- "-bP exim_user exim_group 2>&1|") ||
- die "** Cannot run $parm_exim: $!\n";
-while(<EXIMINFO>)
+
+my $eximinfo = "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd -bP exim_user exim_group";
+chomp(my @eximinfo = `$eximinfo 2>&1`);
+die "$0: Can't run $eximinfo\n" if $? == -1;
+
+warn 'Got ' . $?>>8 . " from $eximinfo\n" if $?;
+foreach (@eximinfo)
{
if (my ($version) = /^Exim version (\S+)/) {
my $git = `git describe --dirty=-XX --match 'exim-4*'`;
if /^Configure owner:\s*(\d+):(\d+)/;
print if /wrong owner/;
}
-close(EXIMINFO);
-if (defined $parm_eximuser)
- {
- if ($parm_eximuser =~ /^\d+$/) { $parm_exim_uid = $parm_eximuser; }
- else { $parm_exim_uid = getpwnam($parm_eximuser); }
- }
-else
- {
- print "Unable to extract exim_user from binary.\n";
- print "Check if Exim refused to run; if so, consider:\n";
- print " TRUSTED_CONFIG_LIST ALT_CONFIG_PREFIX WHITELIST_D_MACROS\n";
- print "If debug permission denied, are you in the exim group?\n";
- die "Failing to get information from binary.\n";
- }
+if (not defined $parm_eximuser) {
+ die <<XXX, map { "|$_\n" } @eximinfo;
+Unable to extract exim_user from binary.
+Check if Exim refused to run; if so, consider:
+ TRUSTED_CONFIG_LIST ALT_CONFIG_PREFIX WHITELIST_D_MACROS
+If debug permission denied, are you in the exim group?
+Failing to get information from binary.
+Output from $eximinfo:
+XXX
+
+}
+
+if ($parm_eximuser =~ /^\d+$/) { $parm_exim_uid = $parm_eximuser; }
+else { $parm_exim_uid = getpwnam($parm_eximuser); }
if (defined $parm_eximgroup)
{