]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: skip chown/separator with conflicting group IDs
authorAssaf Gordon <assafgordon@gmail.com>
Fri, 24 Jan 2014 01:34:52 +0000 (20:34 -0500)
committerPádraig Brady <P@draigBrady.com>
Fri, 24 Jan 2014 17:14:04 +0000 (17:14 +0000)
* tests/chown/separator.sh: skip test if the user's group has
multiple entries.
Fixes http://bugs.gnu.org/16532

tests/chown/separator.sh

index f64b7382c84e6cadeffe429c6b7b425b6d656291..f5ecb5bbddd3bdf8d584c5db568e514108560c6e 100755 (executable)
@@ -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.