summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-16 21:58:48 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-16 21:58:48 +0000
commit9842bf827890e67dd2e205638b216bd3f07dae9e (patch)
treed61d01a254b8731d07becd0263515df80b8e7be1 /tests
parent0142be6908d7b930dd1d1d392bf19b61027a4939 (diff)
downloadcoreutils-9842bf827890e67dd2e205638b216bd3f07dae9e.tar.xz
* tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
Skip this test if "chmod g+s d" silently does nothing.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/chmod/setgid16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index 93a2c2e81..67381fe1a 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -17,18 +17,15 @@ trap '(exit $?); exit' 1 2 13 15
framework_failure=0
-# Record absolute path of srcdir and cd back to current dir.
-cd $srcdir || framework_failure=1
-abs_srcdir=`pwd`
-cd $pwd || framework_failure=1
-
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
+test=../../../src/test
+
umask 0
mkdir d || framework_failure=1
-chmod g+s d 2> /dev/null ||
+chmod g+s d 2> /dev/null && $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
@@ -46,6 +43,13 @@ if test $framework_failure = 1; then
(exit 1); exit 1
fi
+# "chmod g+s d" does nothing on some NFS file systems.
+$test -g d || {
+ echo 1>&2 "$0: cannot create setgid directories," \
+ "so can't run this test"
+ exit 77
+}
+
fail=0
chmod 755 d