added a getattr test, removed a test for loopback.pl being executable (which
authorMark Glines <mark@glines.org>
Mon, 22 Apr 2002 03:22:52 +0000 (03:22 +0000)
committerMark Glines <mark@glines.org>
Mon, 22 Apr 2002 03:22:52 +0000 (03:22 +0000)
doesn't matter)

perl/test/getattr.t
perl/test/s/mount.t

index 6485b6e014215c13847c3104b597c9eaaab59584..420327510b84bfc798bfa19756bf5ca90532b451 100644 (file)
@@ -2,9 +2,9 @@
 use test::helper qw($_real $_point);
 use Test::More;
 use Data::Dumper;
-plan tests => 27;
+plan tests => 28;
 my ($a, $b) = ("$_real/wibble","$_point/wibble");
-`touch $a`;
+`touch $b`;
 is(-A "$a", -A "$b", '-A'); # 1
 is(-B "$a", -B "$b", '-B'); # 2
 is(-C "$a", -C "$b", '-C'); # 3
@@ -32,4 +32,11 @@ 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`;
index 1deb2c4945260741b67d30af70b00ce9823156fb..26f6fc2a3034802343228f35f216acf3194634de 100644 (file)
@@ -1,10 +1,9 @@
 #!/usr/bin/perl -w
 use test::helper qw($_point $_loop $_real $_pidfile);
 use strict;
-use Test::More tests => 4;
+use Test::More tests => 3;
 ok(!(scalar grep(/ on $_point /,`cat /proc/mounts`)),"already mounted");
 ok(-f $_loop,"loopback exists");
-ok(-x $_loop,"loopback executable");
 
 if(!fork()) {
        #close(STDIN);