2 #include <sys/statfs.h>
3 #include <sys/statvfs.h>
4 #include <support/check.h>
7 /* This test cannot detect many errors. But it will fail if the
8 statvfs is completely hosed and it'll detect a missing export. So
9 it is better than nothing. */
11 do_test (int argc
, char *argv
[])
13 for (int i
= 1; i
< argc
; ++i
)
17 TEST_COMPARE (statvfs (argv
[i
], &st
), 0);
18 TEST_COMPARE (statfs (argv
[i
], &stf
), 0);
19 TEST_COMPARE (st
.f_type
, (unsigned int) stf
.f_type
);
20 printf ("%s: free: %llu, mandatory: %s, tp=%x\n", argv
[i
],
21 (unsigned long long int) st
.f_bfree
,
23 (st
.f_flag
& ST_MANDLOCK
) ? "yes" : "no",
32 #define TEST_FUNCTION do_test (argc, argv)
33 #include "../test-skeleton.c"