summaryrefslogtreecommitdiff
path: root/tests/chmod
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-04-20 23:18:48 +0200
committerJim Meyering <meyering@redhat.com>2008-04-20 23:18:48 +0200
commitfdb7e5b44ce87d725e5e7bca3746c494cfa47fd2 (patch)
tree93093ba36335fefd308f0a68fb47b7e6914c1997 /tests/chmod
parentb29e812e824ac86464dc05e066f8adc5fe2e46ad (diff)
downloadcoreutils-fdb7e5b44ce87d725e5e7bca3746c494cfa47fd2.tar.gz
coreutils-fdb7e5b44ce87d725e5e7bca3746c494cfa47fd2.tar.bz2
coreutils-fdb7e5b44ce87d725e5e7bca3746c494cfa47fd2.zip
Use "env" to invoke potential built-ins.
* tests/misc/pwd-unreadable-parent: Invoke pwd via "env -- pwd", rather than via an absolute name. * tests/touch/not-owner: Likewise for test. * tests/chmod/setgid: Likewise.
Diffstat (limited to 'tests/chmod')
-rwxr-xr-xtests/chmod/setgid8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index d5d35f976..cee9ca6bb 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -2,7 +2,7 @@
# Make sure GNU chmod works the same way as those of Solaris, HPUX, AIX
# wrt directories with the setgid bit set.
-# Copyright (C) 2001, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,12 +25,10 @@ fi
. $srcdir/../lang-default
. $srcdir/../test-lib.sh
-test=$abs_top_builddir/src/test
-
umask 0
mkdir d || framework_failure
-chmod g+s d 2> /dev/null && "$test" -g d ||
+chmod g+s d 2> /dev/null && env -- test -g d ||
{
# This is required because on some systems (at least NetBSD 1.4.2A),
# it may happen that when you create a directory, its group isn't one
@@ -44,7 +42,7 @@ chmod g+s d 2> /dev/null && "$test" -g d ||
}
# "chmod g+s d" does nothing on some NFS file systems.
-"$test" -g d ||
+env -- test -g d ||
skip_test_ 'cannot create setgid directories'
fail=0