summaryrefslogtreecommitdiff
path: root/tests/chown/separator
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-06-11 11:52:03 +0200
committerJim Meyering <meyering@redhat.com>2008-06-11 11:52:03 +0200
commit47ed009e5742f2ba396194d5faac35eb0587d220 (patch)
tree1394cf7527e983dd425f2dd6e7384dc0c9437433 /tests/chown/separator
parent394f88c4aa3013feb7f808ee596ca234f719dbe1 (diff)
downloadcoreutils-47ed009e5742f2ba396194d5faac35eb0587d220.tar.xz
tests: skip a chown test on FreeBSD 6.x
* tests/chown/separator: Skip this test if is likely to fail due to the combination of a bogus group name and a broken getgrnam function.
Diffstat (limited to 'tests/chown/separator')
-rwxr-xr-xtests/chown/separator11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/chown/separator b/tests/chown/separator
index eaf27b6c7..cfd5f0c7e 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -35,6 +35,17 @@ test -n "$id_g" || framework_failure
id_gn=`id -gn` || framework_failure
test -n "$id_gn" || framework_failure
+# 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.
+case $host_triplet in
+ *-freebsd6.*)
+ case $id_gn in
+ *[^a-zA-Z0-9._-]*) skip_test_ "invalid group name: $id_gn";;
+ esac;;
+ *) ;;
+esac
+
fail=0
chown '' . || fail=1