/[fuse.before_github]/perl/trunk/test/statfs.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /perl/trunk/test/statfs.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10 by mszeredi, Thu Nov 11 14:44:15 2004 UTC revision 11 by dpavlin, Sun Mar 20 00:37:31 2005 UTC
# Line 3  use test::helper qw($_real $_point); Line 3  use test::helper qw($_real $_point);
3  use Test::More;  use Test::More;
4  require 'syscall.ph'; # for SYS_statfs  require 'syscall.ph'; # for SYS_statfs
5  plan tests => 7;  plan tests => 7;
6  my ($statfs_data) = "    " x 10;  my ($statfs_data) = "        " x 16;
7  my ($tmp) = $_point;  my ($tmp) = $_point;
8  ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs");  ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs");
9  # FIXME: this is soooooo linux-centric.  perhaps parse the output of /bin/df?  # FIXME: this is soooooo linux-centric.  perhaps parse the output of /bin/df?
10  my @list = unpack("LSSL8",$statfs_data);  my @list = unpack("L!7L2L!7",$statfs_data);
11    print join(', ', @list)."\n";
12  shift(@list);  shift(@list);
13  is(shift(@list),4096,"block size");  is(shift(@list),4096,"block size");
 shift(@list);  
14  is(shift(@list),1000000,"blocks");  is(shift(@list),1000000,"blocks");
15  is(shift(@list),500000,"blocks free");  is(shift(@list),500000,"blocks free");
16  shift(@list);  shift(@list);

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26