diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-16 21:58:48 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-16 21:58:48 +0000 |
commit | 9842bf827890e67dd2e205638b216bd3f07dae9e (patch) | |
tree | d61d01a254b8731d07becd0263515df80b8e7be1 | |
parent | 0142be6908d7b930dd1d1d392bf19b61027a4939 (diff) | |
download | coreutils-9842bf827890e67dd2e205638b216bd3f07dae9e.tar.xz |
* tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
Skip this test if "chmod g+s d" silently does nothing.
-rw-r--r-- | ChangeLog | 13 | ||||
-rwxr-xr-x | tests/chmod/setgid | 16 |
2 files changed, 19 insertions, 10 deletions
@@ -1,3 +1,12 @@ +2006-08-16 Paul Eggert <eggert@cs.ucla.edu> + + Fix some problems reported by Bruno Haible. + * tests/chmod/setgid (abs_srcdir): Remove; not used or needed. + Skip this test if "chmod g+s d" silently does nothing. + * tests/ls-2/tests: Skip this test suite if we can't set up files + properly for the setuid-etc test. This simplifies some of the + hacks we were using to work around porting problems. + 2006-08-16 Jim Meyering <jim@meyering.net> * tests/cp/Makefile.am: Don't mark "acl" as XFAIL. @@ -7,10 +16,6 @@ 2006-08-16 Paul Eggert <eggert@cs.ucla.edu> - * tests/ls-2/tests: Skip this test suite if we can't set up files - properly for the setuid-etc test. This simplifies some of the - hacks we were using to work around porting problems. - * tests/lang-default (LC_ALL): Set to "C", so we get English-language diagnostics. Unset the other variables; it should be portable to use 'unset' for this stuff nowadays. 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 |