aboutsummaryrefslogtreecommitdiffstats
path: root/perl/test
diff options
context:
space:
mode:
authorMark Glines <mark@glines.org>2002-04-22 02:52:33 +0000
committerMark Glines <mark@glines.org>2002-04-22 02:52:33 +0000
commit255560845c1246e0bd4643e8eeddc02e72ff2ffe (patch)
treedbef9857576f032bb35251da9685c1d688efc6a1 /perl/test
parent8811161f67657253d11214ede54857f810662a91 (diff)
downloadlibfuse-255560845c1246e0bd4643e8eeddc02e72ff2ffe.tar.gz
tuned testing system slightly
Diffstat (limited to 'perl/test')
-rw-r--r--perl/test/getattr.t11
-rw-r--r--perl/test/helper.pm2
-rw-r--r--perl/test/utime.t4
3 files changed, 5 insertions, 12 deletions
diff --git a/perl/test/getattr.t b/perl/test/getattr.t
index 49eef14..6485b6e 100644
--- a/perl/test/getattr.t
+++ b/perl/test/getattr.t
@@ -2,9 +2,9 @@
use test::helper qw($_real $_point);
use Test::More;
use Data::Dumper;
-plan tests => 28;
+plan tests => 27;
my ($a, $b) = ("$_real/wibble","$_point/wibble");
-`touch $a; sleep 1; cat $a >/dev/null`;
+`touch $a`;
is(-A "$a", -A "$b", '-A'); # 1
is(-B "$a", -B "$b", '-B'); # 2
is(-C "$a", -C "$b", '-C'); # 3
@@ -32,11 +32,4 @@ is(-u "$a", -u "$b", '-u'); # 24
is(-w "$a", -w "$b", '-w'); # 25
is(-x "$a", -x "$b", '-x'); # 26
is(-z "$a", -z "$b", '-z'); # 27
-my (@astat, @bstat);
-@astat = stat("$a");
-@bstat = stat("$b");
-# dev and inode can legally change
-shift(@astat); shift(@astat);
-shift(@bstat); shift(@bstat);
-is(join(" ",@astat),join(" ",@bstat),"stat()");
`rm -f $a`;
diff --git a/perl/test/helper.pm b/perl/test/helper.pm
index 3d980ec..0be9ab8 100644
--- a/perl/test/helper.pm
+++ b/perl/test/helper.pm
@@ -17,7 +17,7 @@ if($0 !~ qr|s/u?mount\.t$|) {
}
}
}
- $reject = 0 if (system("ls $_point >&/dev/null") >> 8);
+ $reject = 1 if (system("ls $_point >&/dev/null") >> 8);
die "not properly mounted\n" if $reject;
}
1;
diff --git a/perl/test/utime.t b/perl/test/utime.t
index 0303907..8ccefc6 100644
--- a/perl/test/utime.t
+++ b/perl/test/utime.t
@@ -8,6 +8,6 @@ system("echo frog >file");
chdir($_point);
ok(utime(1,2,"file"),"set utime");
@stat = stat("file");
-is($stat[9],1,"atime");
-is($stat[10],2,"atime");
+is($stat[8],1,"atime");
+is($stat[9],2,"mtime");
unlink("file");