summaryrefslogtreecommitdiff
path: root/init.cfg
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-04-12 22:57:45 +0100
committerPádraig Brady <P@draigBrady.com>2013-04-14 01:03:56 +0100
commit1dd8a33169b69716c4a4b92dbe1bd99336d92b23 (patch)
treedee302fc0b33752491e18705c57eb830d8f7e3a3 /init.cfg
parentc8ac385299950ba84eb8c33f7e32e4d85b18e3ff (diff)
downloadcoreutils-1dd8a33169b69716c4a4b92dbe1bd99336d92b23.tar.xz
tests: avoid false failures with non default groups
On OS X it was seen that the group ID used for new files, are set to a that of the directory rather than the current user. It's not currently understood when this happens, but it was confirmed that ACLs, extended attributes and setgid bits are _not_ involved. * init.cfg (skip_if_nondefault_group_): A new function to detect and avoid this situation. Document with links to the discussions for hopefully future clarification. * tests/install/install-C-root.sh: Use the new function. * tests/install/install-C-selinux.sh: Likewise. * tests/install/install-C.sh: Likewise.
Diffstat (limited to 'init.cfg')
-rw-r--r--init.cfg13
1 files changed, 13 insertions, 0 deletions
diff --git a/init.cfg b/init.cfg
index 093cd8586..7976b6166 100644
--- a/init.cfg
+++ b/init.cfg
@@ -502,6 +502,19 @@ skip_if_setgid_()
esac
}
+# Skip if files are created with a different group to the current user
+# This can happen due to a setgid dir, or by some other mechanism on OS X:
+# http://unix.stackexchange.com/q/63865
+# http://bugs.gnu.org/14024#41
+skip_if_nondefault_group_()
+{
+ touch grp.$$
+ gen_ug=$(stat -c '%u:%g' grp.$$)
+ rm grp.$$
+ test "$gen_ug" = "$(id -ru):$(id -rg)" ||
+ skip_ 'Files are created with a different gid'
+}
+
skip_if_mcstransd_is_running_()
{
test $# = 0 || framework_failure_