Change statvfs test so it doesn't depend on device size.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 30 Jun 2009 14:10:31 +0000 (15:10 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 30 Jun 2009 17:09:07 +0000 (18:09 +0100)
Current statvfs test depended on a lot of filesystem details
which can change if the CHS of the underlying block device
changes (eg. with the switch from IDE -> virtio).  These are
not really necessary to test the call, so instead just check
for filesystem features.

src/generator.ml

index 242d292..cbe8ca7 100755 (executable)
@@ -1499,8 +1499,7 @@ This is the same as the C<lstat(2)> system call.");
 
   ("statvfs", (RStatVFS "statbuf", [String "path"]), 54, [],
    [InitBasicFS, Always, TestOutputStruct (
-      [["statvfs"; "/"]], [CompareWithInt ("bfree", 487702);
-                          CompareWithInt ("blocks", 490020);
+      [["statvfs"; "/"]], [CompareWithInt ("namemax", 255);
                           CompareWithInt ("bsize", 1024)])],
    "get file system statistics",
    "\