about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-10 15:55:35 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-10 15:55:35 +0000
commit3b6906390e379bc9110583ecab9b73febeae8ac7 (patch)
tree730e62009c37e3e1e8f63b1d0eacdbba12b6e96e
parente79af11c364447c85d4824fc604a011ffefcb7e6 (diff)
downloadglibc-3b6906390e379bc9110583ecab9b73febeae8ac7.tar.gz
glibc-3b6906390e379bc9110583ecab9b73febeae8ac7.tar.xz
glibc-3b6906390e379bc9110583ecab9b73febeae8ac7.zip
Update.
2000-04-10  Andreas Schwab  <schwab@suse.de>

	* posix/globtest.sh: Skip tests that depend on unreadable
	directories if run as root.
-rw-r--r--ChangeLog5
-rwxr-xr-xposix/globtest.sh17
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 004dfe04b1..810528d4b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-10  Andreas Schwab  <schwab@suse.de>
+
+	* posix/globtest.sh: Skip tests that depend on unreadable
+	directories if run as root.
+
 2000-04-10  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/clock_settime.c (clock_settime): Test tv_nsec value
diff --git a/posix/globtest.sh b/posix/globtest.sh
index e2ba320358..60f1bf81d0 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -306,13 +306,20 @@ cat <<"EOF" | cmp - $testout || result=1
 GLOB_NOMATCH
 EOF
 
-# ... with GLOB_ERR
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
-${common_objpfx}posix/globtest -E "$testdir" "noread/*" |
-sort > $testout
-cat <<"EOF" | cmp - $testout || result=1
+# The following tests will fail if run as root.
+user=`id -un 2> /dev/null`
+if test -z "$user"; then
+    uid="$USER"
+fi
+if test "$user" != root; then
+    # ... with GLOB_ERR
+    ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+    ${common_objpfx}posix/globtest -E "$testdir" "noread/*" |
+    sort > $testout
+    cat <<"EOF" | cmp - $testout || result=1
 GLOB_ABORTED
 EOF
+fi # not run as root
 
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
 ${common_objpfx}posix/globtest -E "$testdir" "noread*/*" |