X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/f3f065bbe8b7d7fdc4d46dbfa063ae4dfb05bfd7..dbb0bf41ba4d59099476e22f1443f2d18ae1037a:/test/runtest diff --git a/test/runtest b/test/runtest index 328b89958..d0caf0df3 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.23 2007/01/31 16:52:12 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.31 2009/10/14 11:34:57 nm4 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -23,7 +23,7 @@ use Socket; # Start by initializing some global variables -$testversion = "4.67 (15-Jan-07)"; +$testversion = "4.70 (14-Oct-09)"; $cf = "bin/cf"; $cr = "\r"; @@ -330,7 +330,8 @@ while() s/TlRMTVNTUAACAAAAAAAAAAAoAAABgg[\w+\/]+/TlRMTVNTUAACAAAAAAAAAAAoAAABggAAAEbBRwqFwwIAAAAAAAAAAAAt1sgAAAAA/; # PRVS values - s?prvs=([^/]+)/[\da-f]{10}@?prvs=$1/xxxxxxxxxx@?g; + 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 @@ -338,6 +339,9 @@ while() 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/; + # One error test in expansions mentions base 62 or 36 s/is not a base (36|62) number/is not a base 36\/62 number/; @@ -463,9 +467,10 @@ while() # ======== Exim's login ======== - # For bounce messages, this will appear on the U= lines in logs and also - # after Received: and in addresses. In one pipe test it appears after - # "Running as:". It also appears in addresses, and in the names of lock + # For messages received by the daemon, this is in the -H file, which some + # tests inspect. For bounce messages, this will appear on the U= lines in + # logs and also after Received: and in addresses. In one pipe test it appears + # after "Running as:". It also appears in addresses, and in the names of lock # files. s/U=$parm_eximuser/U=EXIMUSER/; @@ -482,10 +487,18 @@ while() s/\buid=$parm_exim_uid\b/uid=EXIM_UID/g; s/\bgid=$parm_exim_gid\b/gid=EXIM_GID/g; + s/^$parm_eximuser $parm_exim_uid $parm_exim_gid/EXIMUSER EXIM_UID EXIM_GID/; + # ======== General uids, gids, and pids ======== # Note: this must come after munges for caller's and exim's uid/gid + # These are for systems where long int is 64 + s/\buid=4294967295/uid=-1/; + s/\beuid=4294967295/euid=-1/; + s/\bgid=4294967295/gid=-1/; + s/\begid=4294967295/egid=-1/; + s/\bgid=\d+/gid=gggg/; s/\begid=\d+/egid=gggg/; s/\bpid=\d+/pid=pppp/; @@ -521,8 +534,8 @@ while() s/\(port=(\d+)/"(port=" . new_value($1, "%s", \$next_port)/e; # This handles "connection from" and the like, when the port is given - if (!/listening for SMTP on/ && !/Connecting to/ && !/=>/ && !/\*>/ && - !/Connection refused/) + if (!/listening for SMTP on/ && !/Connecting to/ && !/=>/ && !/->/ + && !/\*>/ && !/Connection refused/) { s/\[([a-z\d:]+|\d+(?:\.\d+){3})\]:(\d+)/"[".$1."]:".new_value($2,"%s",\$next_port)/ie; } @@ -585,7 +598,7 @@ while() s/([\s,])S=\d+\b/$1S=sss/; s/:S\d+\b/:Ssss/; s/^(\s*\d+m\s+)\d+(\s+[a-z0-9-]{16} <)/$1sss$2/i if $is_stdout; - s/\sSIZE=\d+\b/ SIZE=ssss/ if $is_stderr || $is_stdout; + s/\sSIZE=\d+\b/ SIZE=ssss/; s/\ssize=\d+\b/ size=sss/ if $is_stderr; s/old size = \d+\b/old size = sssss/; s/message size = \d+\b/message size = sss/; @@ -899,7 +912,7 @@ if (! -e $sf) print "\n"; print "------------ $f -----------\n" if (defined $rf && -s $rf && defined $rsf && -s $rsf); - system("$more $f"); + system("$more '$f'"); } } @@ -1013,7 +1026,7 @@ if (-e $sf) # Do the comparison - return 0 if (system("$cf $mf $sf >test-cf") == 0); + return 0 if (system("$cf '$mf' '$sf' >test-cf") == 0); # Handle comparison failure @@ -1033,7 +1046,7 @@ if (-e $sf) # Update or delete the saved file, and give the appropriate return code. if (-s $mf) - { tests_exit(-1, "Failed to cp $mf $sf") if system("cp $mf $sf") != 0; } + { tests_exit(-1, "Failed to cp $mf $sf") if system("cp '$mf' '$sf'") != 0; } else { tests_exit(-1, "Failed to unlink $sf") if !unlink($sf); }