globtest.sh
Andreas Schwab
schwab@suse.de
Mon Apr 10 07:38:00 GMT 2000
The "noread" glob tests in 2.2 cannot be run as root since root can read
everything. That should be handled gracefully.
Andreas.
2000-04-10 Andreas Schwab <schwab@suse.de>
* posix/globtest.sh: Skip tests that depend on unreadable
directories if run as root.
Index: posix/globtest.sh
===================================================================
RCS file: /cvs/glibc/libc/posix/globtest.sh,v
retrieving revision 1.11
diff -u -a -u -r1.11 posix/globtest.sh
--- posix/globtest.sh 2000/03/20 00:45:09 1.11
+++ posix/globtest.sh 2000/04/10 14:34:51
@@ -306,6 +306,9 @@
GLOB_NOMATCH
EOF
+# The following tests will fail if run as root.
+if test "`id -un`" != root; then
+
# ... with GLOB_ERR
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -E "$testdir" "noread/*" |
@@ -320,6 +323,8 @@
cat <<"EOF" | cmp - $testout || result=1
GLOB_ABORTED
EOF
+
+endif # not run as root
# Try multiple patterns (GLOB_APPEND)
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
More information about the Libc-hacker
mailing list