X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsyslfs.t;h=ce91db6e3cb042c65ad7a3e297244f5a5b5903e6;hb=6b8eaf932222db04db65aff99717b9c1dbd0a692;hp=1fe5032cf3207dd1aba97bdecff21f4d77dd0f14;hpb=56d29690c8ebd1c37bb431304b220d01f5ba17f0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t index 1fe5032..ce91db6 100644 --- a/t/lib/syslfs.t +++ b/t/lib/syslfs.t @@ -3,12 +3,6 @@ # If you modify/add tests here, remember to update also t/op/lfs.t. BEGIN { - # Don't bother if there are no quads. - eval { my $q = pack "q", 0 }; - if ($@) { - print "1..0\n# no 64-bit types\n"; - exit(0); - } chdir 't' if -d 't'; unshift @INC, '../lib'; require Config; import Config; @@ -49,6 +43,13 @@ if ($^O eq 'win32' || $^O eq 'vms') { bye(); } +# Known haves that have problems running this test +# (for example because they do not support sparse files, like UNICOS) +if ($^O eq 'unicos') { + print "1..0\n# large files known to work but unable to test them here\n"; + bye(); +} + # Then try to deduce whether we have sparse files. # We'll start off by creating a one megabyte file which has @@ -68,7 +69,7 @@ my @s; print "# @s\n"; -my $BLOCKSIZE = 512; # is this really correct everywhere? +my $BLOCKSIZE = $s[11] || 512; unless (@s == 13 && $s[7] == 1_000_003 && @@ -109,6 +110,12 @@ unless($syswrite && $close) { print "# @s\n"; +unless ($s[7] == 5_000_000_003) { + print "1..0\n# not configured to use large files?\n"; + explain(); + bye(); +} + sub fail () { print "not "; $fail++; @@ -180,4 +187,8 @@ explain if $fail; bye(); # does the necessary cleanup +END { + unlink "big"; # be paranoid about leaving 5 gig files lying around +} + # eof