summaryrefslogtreecommitdiff
path: root/tests/chown
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2014-01-23 20:34:52 -0500
committerPádraig Brady <P@draigBrady.com>2014-01-24 17:14:04 +0000
commit9bc386382c44a83ddc141057f720d24a37a4c1c3 (patch)
treed86bfc1504e76fffff6602e11387eac6d49c4e34 /tests/chown
parentbe97f3e0eff3b582ad35eb63e5edf0615019769f (diff)
downloadcoreutils-9bc386382c44a83ddc141057f720d24a37a4c1c3.tar.xz
tests: skip chown/separator with conflicting group IDs
* tests/chown/separator.sh: skip test if the user's group has multiple entries. Fixes http://bugs.gnu.org/16532
Diffstat (limited to 'tests/chown')
-rwxr-xr-xtests/chown/separator.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/chown/separator.sh b/tests/chown/separator.sh
index f64b7382c..f5ecb5bbd 100755
--- a/tests/chown/separator.sh
+++ b/tests/chown/separator.sh
@@ -31,6 +31,12 @@ test -n "$id_g" || framework_failure_
id_gn=$(id -gn) || framework_failure_
test -n "$id_gn" || framework_failure_
+# Systems with both local and external groups with conflicting IDs,
+# were seen to fail this test erroneously with EPERM errors.
+test $(getent group | grep "^$id_gn:" | wc -l) = 1 ||
+ skip_ "group '$id_gn' not biunique: " \
+ "$(getent group | grep "^$id_gn:" | tr '\n' ',')"
+
# FreeBSD 6.x's getgrnam fails to look up a group name containing
# a space. On such a system, skip this test if the group name contains
# a byte not in the portable filename character set.