Change 13639 by jhi@alpha on 2001/12/12 01:44:39

        (1) To assume any setuid programs is silly.
        (2) Chaining tests with booleans means that some
            of them may not get run which means getting out
            of test count sync.

Affected files ...

.... //depot/perl/t/op/stat.t#48 edit

Differences ...

==== //depot/perl/t/op/stat.t#48 (xtext) ====
Index: perl/t/op/stat.t
--- perl/t/op/stat.t.~1~        Tue Dec 11 19:00:06 2001
+++ perl/t/op/stat.t    Tue Dec 11 19:00:06 2001
@@ -233,8 +233,6 @@
 ok(! -S $Curdir,    '!-S cwd');
 
 SKIP: {
-    skip "No setuid", 3 if $Is_MPE or $Is_Amiga or $Is_Dosish or $Is_Cygwin;
-
     my($cnt, $uid);
     $cnt = $uid = 0;
 
@@ -254,17 +252,11 @@
     }
     closedir BIN;
 
-    if( !isnt($cnt, 0,    'found some programs') ||
-        !isnt($uid, 0,    'found some setuid programs') ||
-        !ok($uid < $cnt,  "  they're not all setuid") )
-    {
-        print <<DIAG;
-# The above two tests assume that at least one of these directories
-# are readable, executable and contain at least one setuid file
-# (but aren't all setuid).
-#   @bin
-DIAG
-    }
+    skip "No setuid programs", 3 if $uid == 0;
+
+    isnt($cnt, 0,    'found some programs');
+    isnt($uid, 0,    '  found some setuid programs');
+    ok($uid < $cnt,  "    they're not all setuid");
 }
 
 
End of Patch.

Reply via email to