From 38e3a1dd49d6a2793eb990da60efae25a2ba1fcf Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 2 Aug 2016 09:30:06 -0700 Subject: [PATCH] tests: skip a /proc/self-dependent test on the Hurd * tests/brief-vs-stat-zero-kernel-lies: The Hurd's /proc/self is not useful, so detect that and skip the test that requires it. Reported by Assaf Gordon in https://debbugs.gnu.org/24121#29 --- tests/brief-vs-stat-zero-kernel-lies | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/brief-vs-stat-zero-kernel-lies b/tests/brief-vs-stat-zero-kernel-lies index 9b272c6..7b043db 100755 --- a/tests/brief-vs-stat-zero-kernel-lies +++ b/tests/brief-vs-stat-zero-kernel-lies @@ -14,6 +14,14 @@ test -f $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 +# /proc/self is not useful on the Hurd, where it always points to "1", +# so skip this test when /proc/self does not point to a file whose name is +# the current process ID. +readlink /proc/self > pid & pid=$! +wait $pid +echo $pid > exp +compare exp pid || skip_ /proc/self is not useful on this system + # There are two code paths to test: one for non-binary and one for binary files. # $boot is non-binary. cat $boot > ref || framework_failure_ -- 2.8.0-rc2