]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
authorJim Meyering <jim@meyering.net>
Fri, 9 Mar 2007 07:47:33 +0000 (08:47 +0100)
committerJim Meyering <jim@meyering.net>
Fri, 9 Mar 2007 07:47:33 +0000 (08:47 +0100)
* tests/chgrp/basic: Don't let failure by chgrp to set the
group of a symlink make this test fail.  Do give a diagnostic.
In the chgrp-no-change-ctime test, add darwin7.9.0 as another
known-failing system.
When failing on some other system, print $host_triplet, too.
Reported by Peter Fales.

ChangeLog
tests/chgrp/basic

index 5fa5de66388be062764c96e3997d7f45c7d683c2..78f032c53efff7a3c3aa694a7eab6cf9d059142d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-03-09  Jim Meyering  <jim@meyering.net>
+
+       Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
+       * tests/chgrp/basic: Don't let failure by chgrp to set the
+       group of a symlink make this test fail.  Do give a diagnostic.
+       In the chgrp-no-change-ctime test, add darwin7.9.0 as another
+       known-failing system.
+       When failing on some other system, print $host_triplet, too.
+       Reported by Peter Fales.
+
 2007-03-08  Jim Meyering  <jim@meyering.net>
 
        * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
index 897900d00954ca818af7f6a77ab8dc76cca61c05..ccc69f036e4790b9768c303791817ac4d677d7d7 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
 # make sure chgrp is reasonable
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000-2007 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -79,7 +78,11 @@ test `stat --printf=%g f` = $g1 || fail=1
 # This should not change the group of f.
 chgrp -h $g2 symlink
 test `stat --printf=%g f` = $g1 || fail=1
-test `stat --printf=%g symlink` = $g2 || fail=1
+
+# Don't fail if chgrp failed to set the group of a symlink.
+# Some systems don't support that.
+test `stat --printf=%g symlink` = $g2 ||
+  echo 'info: failed to set group of symlink' 1>&2
 
 chown --from=:$g1 :$g2 f; test `stat --printf=%g f` = $g2 || fail=1
 
@@ -110,15 +113,18 @@ sleep 1
 chgrp $g1 f
 
 # The following no-change chgrp command is supposed to update f's ctime,
-# but on OpenBSD, it appears to be a no-op for some file system types
-# (at least NFS) so g's ctime is more recent.  This is not a big deal;
+# but on OpenBSD and Darwin 7.9.0, it appears to be a no-op for some file
+# system types (at least NFS) so g's ctime is more recent.
+# This is not a big deal;
 # this test works fine when the files are on a local file system (/tmp).
 chgrp '' f
 test "`ls -C -c -t f g`" = 'f  g' || \
   {
     case $host_triplet in
-      *openbsd*) echo ignoring known OpenBSD-specific chgrp failure 1>&2  ;;
-      *)         echo no-change chgrp failed to update ctime 1>&2; fail=1 ;;
+      *openbsd*) echo ignoring known OpenBSD-specific chgrp failure 1>&2 ;;
+      *darwin7.9.0) echo ignoring known MacOS X-specific chgrp failure 1>&2 ;;
+      *) echo $host_triplet: no-change chgrp failed to update ctime 1>&2;
+           fail=1 ;;
     esac
   }