From: Paul Eggert Date: Wed, 16 Aug 2006 21:58:48 +0000 (+0000) Subject: * tests/chmod/setgid (abs_srcdir): Remove; not used or needed. X-Git-Tag: v6.1~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9842bf827890e67dd2e205638b216bd3f07dae9e;p=thirdparty%2Fcoreutils.git * tests/chmod/setgid (abs_srcdir): Remove; not used or needed. Skip this test if "chmod g+s d" silently does nothing. --- diff --git a/ChangeLog b/ChangeLog index 90503d8161..e456c5ea03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-08-16 Paul Eggert + + 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 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL. @@ -7,10 +16,6 @@ 2006-08-16 Paul Eggert - * 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 93a2c2e81a..67381fe1ad 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