X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=test%2Fruntest;h=b2178497d99958834902b7e3f8fb1280e5071f62;hb=71b32d412ac4792ca5e8d4a697afddb46c407bd9;hp=87ce5bfd34ccb9f9c56b7e4a0e4779c90f432f9e;hpb=7329ca93989a243c026aa7bcfd9751d0c2e58772;p=exim.git diff --git a/test/runtest b/test/runtest index 87ce5bfd3..b2178497d 100755 --- a/test/runtest +++ b/test/runtest @@ -33,6 +33,9 @@ use Exim::Runtest; use if $ENV{DEBUG} && $ENV{DEBUG} =~ /\bruntest\b/ => ('Smart::Comments' => '####'); +use constant TEST_TOP => 8999; +use constant TEST_SPECIAL_TOP => 9999; + # Start by initializing some global variables @@ -61,6 +64,7 @@ my $more = 'less -XF'; my $optargs = ''; my $save_output = 0; my $server_opts = ''; +my $slow = 0; my $valgrind = 0; my $have_ipv4 = 1; @@ -68,10 +72,9 @@ my $have_ipv6 = 1; my $have_largefiles = 0; my $test_start = 1; -my $test_end = $test_top = 8999; -my $test_special_top = 9999; +my $test_end = TEST_TOP; + my @test_list = (); -my @test_dirs = (); # Networks to use for DNS tests. We need to choose some networks that will @@ -800,7 +803,10 @@ RESET_AFTER_EXTRA_LINE_READ: # numbers, or handle specific bad conditions in different ways, leading to # different wording in the error messages, so we cannot compare them. - s/(TLS error on connection (?:from .* )?\(SSL_\w+\): error:)(.*)/$1 <>/; +#XXX This loses any trailing "deliving unencypted to" which is unfortunate +# but I can't work out how to deal with that. + s/(TLS session: \(SSL_\w+\): error:)(.*)(?!: delivering)/$1 <>/; + s/(TLS error on connection from .* \(SSL_\w+\): error:)(.*)/$1 <>/; next if /SSL verify error: depth=0 error=certificate not trusted/; # ======== Maildir things ======== @@ -1274,8 +1280,8 @@ if (! -e $sf_current) log_failure($log_failed_filename, $testno, $rf); log_test($log_summary_filename, $testno, 'F') if ($force_continue); } - return 1 if /^c$/i; - last if (/^s$/); + return 1 if /^c$/i && $rf !~ /paniclog/ && $rsf !~ /paniclog/; + last if (/^[sc]$/); } foreach $f ($rf, $rsf) @@ -2266,14 +2272,20 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ if ($args =~ /\$msg/) { - my($listcmd) = "$parm_cwd/eximdir/exim -bp " . - "-DEXIM_PATH=$parm_cwd/eximdir/exim " . - "-C $parm_cwd/test-config |"; - print ">> Getting queue list from:\n>> $listcmd\n" if ($debug); - open (QLIST, $listcmd) || tests_exit(-1, "Couldn't run \"exim -bp\": $!\n"); - my(@msglist) = (); - while () { push (@msglist, $1) if /^\s*\d+[smhdw]\s+\S+\s+(\S+)/; } - close(QLIST); + my @listcmd = ("$parm_cwd/eximdir/exim", '-bp', + "-DEXIM_PATH=$parm_cwd/eximdir/exim", + -C => "$parm_cwd/test-config"); + print ">> Getting queue list from:\n>> @listcmd\n" if $debug; + # We need the message ids sorted in ascending order. + # Message id is: --. On some systems (*BSD) the + # PIDs are randomized, so sorting just the whole PID doesn't work. + # We do the Schartz' transformation here (sort on + # ). Thanks to Kirill Miazine + my @msglist = + map { $_->[1] } # extract the values + sort { $a->[0] cmp $b->[0] } # sort by key + map { [join('.' => (split /-/, $_)[0,2]) => $_] } # key (timestamp.fractional-time) => value(message_id) + map { /^\s*\d+[smhdw]\s+\S+\s+(\S+)/ } `@listcmd` or tests_exit(-1, "No output from `exim -bp` (@listcmd)\n"); # Done backwards just in case there are more than 9 @@ -2310,7 +2322,6 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ if ($cmd =~ /\s-DSERVER=server\s/ && $cmd !~ /\s-DNOTDAEMON\s/) { - $pidfile = "$parm_cwd/spool/exim-daemon.pid"; if ($debug) { printf ">> daemon: $cmd\n"; } run_system("sudo mkdir spool/log 2>/dev/null"); run_system("sudo chown $parm_eximuser:$parm_eximgroup spool/log"); @@ -2337,7 +2348,8 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ while (