# 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;
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
print "# @s\n";
-my $BLOCKSIZE = 512; # is this really correct everywhere?
+my $BLOCKSIZE = $s[11] || 512;
unless (@s == 13 &&
$s[7] == 1_000_003 &&
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++;
bye(); # does the necessary cleanup
+END {
+ unlink "big"; # be paranoid about leaving 5 gig files lying around
+}
+
# eof