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.
# Let's not depend on Fcntl or any other extension.
print "# @s\n";
-my $BLOCKSIZE = 512; # is this really correct everywhere?
+my $BLOCKSIZE = $s[11] || 512;
unless (@s == 13 &&
$s[7] == 1_000_003 &&
} else {
print "# close failed: $!\n"
}
- if ($! =~/File too large/) {
- print "1..0\n# writing past 2GB failed\n";
- explain();
+ if ($! =~/too large/i) {
+ print "1..0\n# writing past 2GB failed: process limits?\n";
+ } elsif ($! =~ /quota/i) {
+ print "1..0\n# filesystem quota limits?\n";
}
+ explain();
bye();
}
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