Decrease the file size used in getattr.t by a factor of 1024.
authorDerrik Pates <demon@now.ai>
Fri, 29 Jul 2011 18:52:14 +0000 (12:52 -0600)
committerDerrik Pates <demon@now.ai>
Fri, 29 Jul 2011 18:52:14 +0000 (12:52 -0600)
This issue has caused the getattr test to take... well, hours on my
MacBook. This is because the kernel is busy allocating disk pages for
all the empty space prior to the space character that's put into the
file, because the HFS+ filesystem doesn't support sparse files.

README
test/getattr.t

diff --git a/README b/README
index 3e15e9a..3d8e2aa 100644 (file)
--- a/README
+++ b/README
@@ -78,9 +78,6 @@ unmount infrastructure is a crock.  I am not pleased with that code.
 
 While most things work, I do still have a TODO list:
 * need to sort out cleaner mount semantics for the test framework
 
 While most things work, I do still have a TODO list:
 * need to sort out cleaner mount semantics for the test framework
-* Do getattr() test in a way that doesn't depend on sparse files, as HFS+
-  doesn't support sparse files, thus causing getattr test to take a very
-  long time.
 
 Currently tests have been attempted and succeeded on:
   * Ubuntu 10.10/amd64
 
 Currently tests have been attempted and succeeded on:
   * Ubuntu 10.10/amd64
index a945cdc..3c417e8 100644 (file)
@@ -8,7 +8,7 @@ sub test_file {
        my ($a, $b) = ("$_real/wibble-$size","$_point/wibble-$size");
 #      diag "test $size Gb file";
        open(my $fh, '>', $a) || die "can't open $b: $!";
        my ($a, $b) = ("$_real/wibble-$size","$_point/wibble-$size");
 #      diag "test $size Gb file";
        open(my $fh, '>', $a) || die "can't open $b: $!";
-       seek($fh, $size * 1024 * 1024 * 1024, 0);
+       seek($fh, $size * 1024 * 1024, 0);
        print $fh ' ';
        close($fh);
 #      diag "size $b = ",-s $b, " $a = ", -s $a;
        print $fh ' ';
        close($fh);
 #      diag "size $b = ",-s $b, " $a = ", -s $a;