X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=blobdiff_plain;f=test%2Fruntest;h=8f5d9b60cf0c5c3dda3cdca8049355b5a1d1b063;hp=4f1d18edb8634726f7a6aa72f246452a06fcfe63;hb=4be52428d30e22d6559876650d614473b4bc8e78;hpb=5f122889caaa3746001f7e1f8e5caca6f6181393 diff --git a/test/runtest b/test/runtest index 4f1d18edb..8f5d9b60c 100755 --- a/test/runtest +++ b/test/runtest @@ -311,7 +311,8 @@ RESET_AFTER_EXTRA_LINE_READ: s?\Q$parm_cwd\E?TESTSUITE?g; # Replace the Exim version number (may appear in various places) - s/Exim \d+\.\d+[\w-]*/Exim x.yz/i; + # patchexim should have fixed this for us + #s/(Exim) \d+\.\d+[\w_-]*/$1 x.yz/i; # Replace Exim message ids by a unique series s/((?:[^\W_]{6}-){2}[^\W_]{2}) @@ -559,9 +560,9 @@ RESET_AFTER_EXTRA_LINE_READ: s/host\s\Q$parm_ipv4\E\s\[\Q$parm_ipv4\E\]/host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]/; s/host\s\Q$parm_ipv6\E\s\[\Q$parm_ipv6\E\]/host ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6]/; s/\b\Q$parm_ipv4\E\b/ip4.ip4.ip4.ip4/g; - s/\b\Q$parm_ipv6\E\b/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g; + s/(^|\W)\K\Q$parm_ipv6\E/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g; s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g; - s/\b\Q$parm_ipv6r\E\b/ip6-reverse/g; + s/(^|\W)\K\Q$parm_ipv6r\E/ip6-reverse/g; s/^(\s+host\s\S+\s+\[\S+\]) +$/$1 /; @@ -592,7 +593,14 @@ RESET_AFTER_EXTRA_LINE_READ: # ======== Output from ls ======== # Different operating systems use different spacing on long output - s/ +/ /g if /^[-rwd]{10} /; + #s/ +/ /g if /^[-rwd]{10} /; + # (Bug 1226) SUSv3 allows a trailing printable char for modified access method control. + # Handle only the Gnu and MacOS space, dot, plus and at-sign. A full [[:graph:]] + # unfortunately matches a non-ls linefull of dashes. + # Allow the case where we've already picked out the file protection bits. + if (s/^([-d](?:[-r][-w][-SsTtx]){3})[.+@]?( +|$)/$1$2/) { + s/ +/ /g; + } # ======== Message sizes ========= @@ -681,6 +689,12 @@ RESET_AFTER_EXTRA_LINE_READ: s/^\d\d\d(?=[PFS*])/ddd/; + # ========= Exim lookups ================== + # Lookups have a char which depends on the number of lookup types compiled in, + # in stderr output. Replace with a "0". Recognising this while avoiding + # other output is fragile; perhaps the debug output should be revised instead. + s%(? re-compare) +# 1 comparison failed; files may have been updated (=> re-compare) # # Does not return if the user replies "Q" to a prompt. @@ -1082,9 +1098,10 @@ if (-e $sf) print "\n"; for (;;) { - interact("Continue, Update & retry, Quit? [Q] ", $force_update); + interact("Continue, Retry, Update & retry, Quit? [Q] ", $force_update); tests_exit(1) if /^q?$/i; return 0 if /^c$/i; + return 1 if /^r$/i; last if (/^u$/i); } } @@ -1116,7 +1133,7 @@ return 1; # # Arguments: none # Returns: 0 if the output compared equal -# 1 if files were updated and the test must be re-run +# 1 if re-run needed (files may have been updated) sub check_output{ my($yield) = 0; @@ -1861,6 +1878,13 @@ autoflush STDOUT 1; print "Exim tester $testversion\n"; +################################################## +# Some tests check created file modes # +################################################## + +umask 022; + + ################################################## # Check for the "less" command # ################################################## @@ -2923,7 +2947,16 @@ if ($have_ipv4 && $parm_ipv4 ne "127.0.0.1") if ($have_ipv6 && $parm_ipv6 ne "::1") { - my(@components) = split /:/, $parm_ipv6; + my($exp_v6) = $parm_ipv6; + $exp_v6 =~ s/[^:]//g; + if ( $parm_ipv6 =~ /^([^:].+)::$/ ) { + $exp_v6 = $1 . ':0' x (9-length($exp_v6)); + } elsif ( $parm_ipv6 =~ /^(.+)::(.+)$/ ) { + $exp_v6 = $1 . ':0' x (8-length($exp_v6)) . ':' . $2; + } elsif ( $parm_ipv6 =~ /^::(.+[^:])$/ ) { + $exp_v6 = '0:' x (9-length($exp_v6)) . $1; + } + my(@components) = split /:/, $exp_v6; my(@nibbles) = reverse (split /\s*/, shift @components); my($sep) = ""; @@ -3167,10 +3200,10 @@ foreach $test (@test_list) for (;;) { - print "\nshow stdErr, show stdOut, Continue (without file comparison), or Quit? [Q] "; + print "\nshow stdErr, show stdOut, Retry, Continue (without file comparison), or Quit? [Q] "; $_ = ; tests_exit(1) if /^q?$/i; - last if /^c$/i; + last if /^[rc]$/i; if (/^e$/i) { system("$more test-stderr"); @@ -3181,6 +3214,7 @@ foreach $test (@test_list) } } + $retry = 1 if /^r$/i; $docheck = 0; } @@ -3203,10 +3237,10 @@ foreach $test (@test_list) for (;;) { - print "\nShow server stdout, Continue, or Quit? [Q] "; + print "\nShow server stdout, Retry, Continue, or Quit? [Q] "; $_ = ; tests_exit(1) if /^q?$/i; - last if /^c$/i; + last if /^[rc]$/i; if (/^s$/i) { @@ -3216,6 +3250,7 @@ foreach $test (@test_list) close(S); } } + $retry = 1 if /^r$/i; } } } @@ -3226,6 +3261,13 @@ foreach $test (@test_list) # function returns 0 if all is well, 1 if we should rerun the test (the files # have been updated). It does not return if the user responds Q to a prompt. + if ($retry) + { + $retry = '0'; + print (("#" x 79) . "\n"); + redo; + } + if ($docheck) { if (check_output() != 0)