X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/df613eb4a1b386c3b57baf09a25511894460b9b1..32c5107fabc2f87670d63dacb236b324a4a9b259:/test/runtest?ds=sidebyside diff --git a/test/runtest b/test/runtest index a66c589f8..b601e01cb 100755 --- a/test/runtest +++ b/test/runtest @@ -1,4 +1,6 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl +# We use env, because in some environments of our build farm +# the Perl 5.010 interpreter is only reachable via $PATH ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -14,7 +16,9 @@ ############################################################################### #use strict; -#use 5.010; +use 5.010; +use warnings; + use Errno; use FileHandle; use IO::Socket::INET; @@ -1041,6 +1045,12 @@ RESET_AFTER_EXTRA_LINE_READ: # Spool filesystem free space changes on different systems. s/^((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/; + # Not all platforms support TCP Fast Open, and the compile omits the check + if (s/\S+ in hosts_try_fastopen\? no \(option unset\)\n$//) + { + $_ .= + } + # When Exim is checking the size of directories for maildir, it uses # the check_dir_size() function to scan directories. Of course, the order # of the files that are obtained using readdir() varies from system to @@ -1439,6 +1449,9 @@ $munges = { '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/' }, + + 'timeout_errno' => # actual errno differs Solaris vs. Linux + { 'mainlog' => 's/(host deferral .* errno) <\d+> /$1 /' }, }; @@ -2167,8 +2180,7 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ # Done backwards just in case there are more than 9 - my($i); - for ($i = @msglist; $i > 0; $i--) { $args =~ s/\$msg$i/$msglist[$i-1]/g; } + for (my $i = @msglist; $i > 0; $i--) { $args =~ s/\$msg$i/$msglist[$i-1]/g; } if ( $args =~ /\$msg\d/ ) { tests_exit(-1, "Not enough messages in spool, for test $testno line $lineno\n") @@ -2360,9 +2372,9 @@ print "Exim tester $testversion\n"; # we map all (.../bin) to (.../sbin:.../bin) $ENV{PATH} = do { my %seen = map { $_, 1 } split /:/, $ENV{PATH}; - join ':' => map { m{(.*)/bin$} - ? ( $seen{"$1/sbin"} ? () : ("$1/sbin"), $_) - : ($_) } + join ':' => map { m{(.*)/bin$} + ? ( $seen{"$1/sbin"} ? () : ("$1/sbin"), $_) + : ($_) } split /:/, $ENV{PATH}; }; @@ -2596,6 +2608,7 @@ 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"; } @@ -3132,8 +3145,15 @@ if ($parm_ipv6 =~ /^[\da-f]/) chomp($temp = `hostname`); die "'hostname' didn't return anything\n" unless defined $temp and length $temp; -$parm_hostname = (gethostbyname($temp))[0]; -$parm_hostname = "no.host.name.found" unless defined $parm_hostname and length $parm_hostname; +if ($temp =~ /\./) + { + $parm_hostname = $temp; + } +else + { + $parm_hostname = (gethostbyname($temp))[0]; + $parm_hostname = "no.host.name.found" unless defined $parm_hostname and length $parm_hostname; + } print "Hostname is $parm_hostname\n"; if ($parm_hostname !~ /\./) @@ -3922,4 +3942,3 @@ tests_exit(-1, "No runnable tests selected") if @test_list == 0; tests_exit(0); # End of runtest script -# vim: set sw=2 et :