summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-12 01:44:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-12 01:44:39 +0000
commit2304a331d828d984dee6ff19ca039ec99e00a365 (patch)
tree127b94213dc2b38cf0c90298032b45900cfc3358 /t
parent8c747ec4175c890f85d6ab76e429d315397def14 (diff)
downloadperl-2304a331d828d984dee6ff19ca039ec99e00a365.tar.gz
(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. p4raw-id: //depot/perl@13639
Diffstat (limited to 't')
-rwxr-xr-xt/op/stat.t18
1 files changed, 5 insertions, 13 deletions
diff --git a/t/op/stat.t b/t/op/stat.t
index 79f9e29d1a..a78670ad17 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -233,8 +233,6 @@ ok(! -c $Curdir, '!-c cwd');
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 @@ SKIP: {
}
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");
}