diff options
author | Jim Meyering <meyering@redhat.com> | 2008-02-23 23:22:58 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-02-23 23:25:17 +0100 |
commit | f656cafd4c290db7abb1ac1d357696ffdc1793b7 (patch) | |
tree | e800e999bacd826cbae5daac53e7dc0c288bb4a7 /tests/test-lib.sh | |
parent | a15329798c52c57cc16fc24265327d8b1c73ab41 (diff) | |
download | coreutils-f656cafd4c290db7abb1ac1d357696ffdc1793b7.tar.xz |
Avoid test failures when root (/) is not readable.
* tests/test-lib.sh (require_readable_root_): New function.
* tests/misc/pwd-long: Skip this test when / is unreadable.
* tests/du/slash: Likewise.
This is required at least for Mandrake/Mandriva in "secure" mode.
Reported by Theodoros V. Kalamatianos in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12800
Diffstat (limited to 'tests/test-lib.sh')
-rw-r--r-- | tests/test-lib.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh index a473dfb31..c494e19ff 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -39,6 +39,11 @@ require_ulimit_() && skip_test_ "this shell lacks ulimit support" } +require_readable_root_() +{ + test -r / || skip_test_ "/ is not readable" +} + # Skip the current test if strace is not available or doesn't work. require_strace_() { |