[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-6.0: test failures on Solaris 7
From: |
Paul Eggert |
Subject: |
Re: coreutils-6.0: test failures on Solaris 7 |
Date: |
Wed, 16 Aug 2006 15:01:30 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> On Solaris 7, building with "cc -O", I get two test failures:
Thanks for reporting these. I installed the following, which I hope
fixes them.
I'd like tests/ls-2/tests to skip only the setuid-etc test if its
setup can't be done, but I don't see any easy way to do this without
hacking on the test harness, so in the meantime this patch just
skips that subsuite.
2006-08-16 Paul Eggert <address@hidden>
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.
--- tests/ls-2/tests 25 Jul 2006 15:40:02 -0000 1.26
+++ tests/ls-2/tests 16 Aug 2006 21:46:11 -0000
@@ -10,6 +10,19 @@ $PERL -e 1 > /dev/null 2>&1 || {
exit 77
}
+# Set up files used by the setuid-etc tests; skip this entire test if
+# that cannot be done for some reason.
+test=../../src/test
+touch setuid && chmod u+s setuid && $test -u setuid &&
+touch setgid && chmod g+s setgid && $test -g setgid &&
+mkdir sticky && chmod +t sticky && $test -k sticky &&
+mkdir owt && chmod +t,o+w owt && $test -k owt &&
+mkdir owr && chmod o+w owr || {
+ echo 1>&2 "$0: cannot create setuid/setgid/sticky files," \
+ "so can't run this test"
+ exit 77
+}
+
exec $PERL -w -I$srcdir/.. -MCoreutils -- - << \EOF
require 5.003;
use strict;
@@ -114,20 +127,6 @@ my @Tests =
. "\e[m"
},
- # This is a kludge to work around the fact that on some systems
- # the files we've just created have a `group ID' that is not one
- # of those associated with the current user. Hence, attempting
- # to do `chmod g+s setgid' fails. This substitution maps the
- # non-highlight 0m code to the expected one.
- {OUT_SUBST => 's/\[0msetgid/[30;43msetgid/'},
-
- {PRE => sub {
- system
- "touch setuid && chmod u+s setuid;"
- ."touch setgid && chmod g+s setgid;"
- ."mkdir sticky && chmod +t sticky;"
- ."mkdir owt && chmod +t,o+w owt;"
- ."mkdir owr && chmod o+w owr" }},
{POST => sub {
unlink qw(setuid setgid);
foreach my $dir (qw(owr owt sticky)) {rmdir $dir} }},
--- tests/chmod/setgid 17 Jul 2006 03:11:51 -0000 1.9
+++ tests/chmod/setgid 16 Aug 2006 21:55:57 -0000
@@ -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