summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulama <julama@fake-box.com>2017-03-22 21:38:32 -0700
committerJim Meyering <meyering@fb.com>2017-03-24 12:43:18 -0700
commit7c636563c24982f6eb7896ef8aa24e6f78c5d48b (patch)
tree2b9ddedd3bf906598c08eddce710c03c0c1cff3f
parent198c55a64557c89f201ddea7cbcb14c09c400071 (diff)
downloaddiffutils-7c636563c24982f6eb7896ef8aa24e6f78c5d48b.tar.gz
tests: avoid false failure for unreadable /proc/cmdline
* tests/brief-vs-stat-zero-kernel-lies: Use "test -r" rather than just "test -f". This avoids a false test failure on a linux system with grsecurity and its GRKERNSEC_PROC_USER option enabled, for which /proc/cmdline is unreadable. Reported in https://bugs.gnu.org/26155
-rwxr-xr-xtests/brief-vs-stat-zero-kernel-lies2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/brief-vs-stat-zero-kernel-lies b/tests/brief-vs-stat-zero-kernel-lies
index 7b043db..82b33e6 100755
--- a/tests/brief-vs-stat-zero-kernel-lies
+++ b/tests/brief-vs-stat-zero-kernel-lies
@@ -10,7 +10,7 @@ fail=0
# Skip the test unless we have an appropriate file.
boot=/proc/cmdline
-test -f $boot || skip_ no $boot file
+test -r $boot || skip_ no $boot file
sz=$(stat --format %s $boot) || skip_ stat --format %s does not work
test $sz = 0 || skip_ $boot has nonzero size