* 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
#!/bin/sh
# `du /' would omit the `/' on the last line.
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
. $srcdir/../test-lib.sh
+require_readable_root_
fail=0
#!/bin/sh
# Ensure that pwd works even when run from a very deep directory.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. $srcdir/../require-perl
. $srcdir/../test-lib.sh
+require_readable_root_
ARGV_0=$0
export ARGV_0
&& 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_()
{