/[fuse.before_github]/perl-llin/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-llin/test/statfs.t

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

revision 21 by dpavlin, Mon Jan 2 19:50:33 2006 UTC revision 112 by dpavlin, Thu Nov 15 09:32:08 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  use test::helper qw($_real $_point);  use test::helper qw($_real $_point);
3  use Test::More;  use Test::More;
4  require 'syscall.ph'; # for SYS_statfs  eval {
5       require 'syscall.ph'; # for SYS_statfs
6    } or plan skip_all => 'No syscall.ph';
7    
8  plan tests => 7;  plan tests => 7;
9  my ($statfs_data) = "        " x 16;  my ($statfs_data) = 0x00 x 8 x 16;
10  my ($tmp) = $_point;  my ($tmp) = $_point;
11  ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs");  ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs");
12  # 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?
13  my @list = unpack("L!7L2L!7",$statfs_data);  my @list = unpack("L!7L2L!7",$statfs_data);
14  print join(', ', @list)."\n";  diag "statfs: ",join(', ', @list);
15  shift(@list);  shift(@list);
16  is(shift(@list),4096,"block size");  is(shift(@list),4096,"block size");
17  is(shift(@list),1000000,"blocks");  is(shift(@list),1000000,"blocks");

Legend:
Removed from v.21  
changed lines
  Added in v.112

  ViewVC Help
Powered by ViewVC 1.1.26