diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-02-10 16:29:20 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-02-10 16:29:20 +0000 |
commit | 21c28500c0afea85a4acc9cd2e6c816522394431 (patch) | |
tree | 176ac3a21ef0323b82faa26105e13091984a1063 /test | |
parent | 8fe918b095c7a6a1b117dbf2f1ca35c8d3cabbb1 (diff) |
Give error if overflow in quota setting in appendfile on a 32-bit
system; make Exim output off_t size for -bV so tests can be appropriate.
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 9 | ||||
-rw-r--r-- | test/confs/5007 | 49 | ||||
-rw-r--r-- | test/log/5007 | 3 | ||||
-rw-r--r-- | test/mail/5005.nofile/maildirsize | 2 | ||||
-rw-r--r-- | test/mail/5005.userx/maildirsize | 2 | ||||
-rw-r--r-- | test/mail/5006.userx/maildirsize | 2 | ||||
-rw-r--r-- | test/mail/5007.userx/maildirsize | 3 | ||||
-rw-r--r-- | test/mail/5007.userx/new/1.myhost.test.ex | 9 | ||||
-rwxr-xr-x | test/runtest | 36 | ||||
-rw-r--r-- | test/scripts/5000-maildir/5005 | 2 | ||||
-rw-r--r-- | test/scripts/5000-maildir/5007 | 7 |
11 files changed, 109 insertions, 15 deletions
diff --git a/test/README b/test/README index f32478817..13284ab2c 100644 --- a/test/README +++ b/test/README @@ -1,4 +1,4 @@ -$Cambridge: exim/test/README,v 1.1 2006/02/06 16:07:10 ph10 Exp $ +$Cambridge: exim/test/README,v 1.2 2006/02/10 16:29:20 ph10 Exp $ EXPORTABLE EXIM TEST SUITE -------------------------- @@ -643,6 +643,13 @@ This command must be at the head of a script. If no IPv6 interface has been found, the entire script is skipped, and a comment is output. + need_largefiles + +This command must be at the head of a script. If the Exim binary does not +suppport large files (off_t is <= 4), the entire script is skipped, and a +comment is output. + + need_move_frozen_messages This command must be at the head of a script. If the Exim binary does not have diff --git a/test/confs/5007 b/test/confs/5007 new file mode 100644 index 000000000..a1ac93e55 --- /dev/null +++ b/test/confs/5007 @@ -0,0 +1,49 @@ +# Exim test configuration 5007 + +QUOTA=500 + +exim_path = EXIM_PATH +host_lookup_order = bydns +primary_hostname = myhost.test.ex +rfc1413_query_timeout = 0s +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + + +# ----- Main settings ----- + +delay_warning = +qualify_domain = test.ex + + +# ----- Routers ----- + +begin routers + +r1: + driver = accept + transport = t1 + +# ----- Transports ----- + +begin transports + +t1: + driver = appendfile + directory = DIR/test-mail/$local_part + user = CALLER + maildir_format + maildir_use_size_file + quota = QUOTA + + +# ----- Retry ----- + +begin retry + +* * F,1d,1d + + +# End diff --git a/test/log/5007 b/test/log/5007 new file mode 100644 index 000000000..16e2bd446 --- /dev/null +++ b/test/log/5007 @@ -0,0 +1,3 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/mail/5005.nofile/maildirsize b/test/mail/5005.nofile/maildirsize index 29b5511a6..068a4d924 100644 --- a/test/mail/5005.nofile/maildirsize +++ b/test/mail/5005.nofile/maildirsize @@ -1,3 +1,3 @@ -dddS,dC +500S,0C ddd d ddd d diff --git a/test/mail/5005.userx/maildirsize b/test/mail/5005.userx/maildirsize index 04dcb85d1..9ae181a23 100644 --- a/test/mail/5005.userx/maildirsize +++ b/test/mail/5005.userx/maildirsize @@ -1,2 +1,2 @@ -dddS,dC +500S,0C ddd d diff --git a/test/mail/5006.userx/maildirsize b/test/mail/5006.userx/maildirsize index 29b5511a6..1f3670618 100644 --- a/test/mail/5006.userx/maildirsize +++ b/test/mail/5006.userx/maildirsize @@ -1,3 +1,3 @@ -dddS,dC +0S,0C ddd d ddd d diff --git a/test/mail/5007.userx/maildirsize b/test/mail/5007.userx/maildirsize new file mode 100644 index 000000000..496f0f6cd --- /dev/null +++ b/test/mail/5007.userx/maildirsize @@ -0,0 +1,3 @@ +3221225472S,0C +ddd d +ddd d diff --git a/test/mail/5007.userx/new/1.myhost.test.ex b/test/mail/5007.userx/new/1.myhost.test.ex new file mode 100644 index 000000000..c077e2b7e --- /dev/null +++ b/test/mail/5007.userx/new/1.myhost.test.ex @@ -0,0 +1,9 @@ +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <CALLER@test.ex>) + id 10HmaX-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> +From: CALLER_NAME <CALLER@test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +Test message diff --git a/test/runtest b/test/runtest index 2210cba3b..d5a161234 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.3 2006/02/09 14:50:58 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.4 2006/02/10 16:29:20 ph10 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -36,6 +36,7 @@ $server_opts = ""; $have_ipv4 = 1; $have_ipv6 = 1; +$have_largefiles = 0; $test_start = 1; $test_end = $test_top = 8999; @@ -614,7 +615,7 @@ while(<IN>) # Maildirsize data if (/^\d+S,\d+C\s*$/) { - print MUNGED "dddS,dC\n"; + print MUNGED; while (<IN>) { last if !/^\d+ \d+\s*$/; @@ -788,7 +789,8 @@ while(<IN>) /^Transports:/ || /^log selectors =/ || /^cwd=/ || - /^Fixed never_users:/ + /^Fixed never_users:/ || + /^Size of off_t:/ ); } @@ -1459,7 +1461,7 @@ if (/^sleep\s+(.*)$/) # Various Unix management commands are recognized -if (/^(ln|ls|du|mkdir|mkfifo|touch|cp)\s/ || +if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ || /^sudo (rmdir|rm|chown|chmod)\s/) { run_system("$_ >>test-stdout 2>>test-stderr"); @@ -1952,9 +1954,14 @@ while (<EXIMINFO>) { my(@temp); - if (/^Exim version/) { print; next; } + if (/^Exim version/) { print; } - if (/^Support for: (.*)/) + elsif (/^Size of off_t: (\d+)/) + { + $have_largefiles = 1 if $1 > 4; + } + + elsif (/^Support for: (.*)/) { print; @temp = split /(\s+)/, $1; @@ -1962,7 +1969,7 @@ while (<EXIMINFO>) %parm_support = @temp; } - if (/^Lookups: (.*)/) + elsif (/^Lookups: (.*)/) { print; @temp = split /(\s+)/, $1; @@ -1970,7 +1977,7 @@ while (<EXIMINFO>) %parm_lookups = @temp; } - if (/^Authenticators: (.*)/) + elsif (/^Authenticators: (.*)/) { print; @temp = split /(\s+)/, $1; @@ -1978,7 +1985,7 @@ while (<EXIMINFO>) %parm_authenticators = @temp; } - if (/^Routers: (.*)/) + elsif (/^Routers: (.*)/) { print; @temp = split /(\s+)/, $1; @@ -1990,7 +1997,7 @@ while (<EXIMINFO>) # that the basic transport name is set, and then the name with each of the # options. - if (/^Transports: (.*)/) + elsif (/^Transports: (.*)/) { print; @temp = split /(\s+)/, $1; @@ -2853,6 +2860,15 @@ foreach $test (@test_list) if (/^rmfiltertest/) { $rmfiltertest = 1; next; } if (/^sortlog/) { $sortlog = 1; next; } + if (/^need_largefiles/) + { + next if $have_largefiles; + print ">>> Large file support is needed for test $testno, but is not available: skipping\n"; + $docheck = 0; # don't check output + undef $_; # pretend EOF + last; + } + if (/^need_ipv4/) { next if $have_ipv4; diff --git a/test/scripts/5000-maildir/5005 b/test/scripts/5000-maildir/5005 index ea7ccc360..a816245ba 100644 --- a/test/scripts/5000-maildir/5005 +++ b/test/scripts/5000-maildir/5005 @@ -1,4 +1,4 @@ -# maildir with maildirsize for quota handling +# maildirsize for quota handling exim -d -odi nofile@test.ex Message for nofile **** diff --git a/test/scripts/5000-maildir/5007 b/test/scripts/5000-maildir/5007 new file mode 100644 index 000000000..e9c8ee48a --- /dev/null +++ b/test/scripts/5000-maildir/5007 @@ -0,0 +1,7 @@ +# maildirsize for quota handling quota > 2G +need_largefiles +# Set a quota that is greater than 2G +exim -DQUOTA=3G -odi userx@test.ex +Test message +**** +no_msglog_check |