+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.
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.
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
(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