>From d1a7148c7094f9d7bf188e90f072a01c7b5279ca Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Wed, 25 Jul 2012 12:40:10 +0200 Subject: [PATCH] tests: avoid spurious failure when running as root Fixes automake bug#12041. * t/primary-prefix-couples-force-valid.sh: If run as root, don't expect a "test -x" on a non-executable files to fail: for root, all files are executable (as well as readable and writable), and at least on Solaris 10 that causes "test -x" to succeed also on non-executable files. Signed-off-by: Stefano Lattarini --- t/primary-prefix-couples-force-valid.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/primary-prefix-couples-force-valid.sh b/t/primary-prefix-couples-force-valid.sh index 23b56c3..ac539a1 100755 --- a/t/primary-prefix-couples-force-valid.sh +++ b/t/primary-prefix-couples-force-valid.sh @@ -54,7 +54,12 @@ test: test -f '$(bindir)/libquux.a' ls -l '$(libexecdir)/bar.h' test -f '$(libexecdir)/bar.h' - test ! -x '$(libexecdir)/bar.h' +## If this test is run as root, "test -x" could suceed also for +## non-executable files, so we need to protect the next check. +## See automake bug#12041. + if test -x Makefile; then echo SKIP THIS; else \ + test ! -x '$(libexecdir)/bar.h'; \ + fi; END cat > foo.c <<'END' -- 1.7.12.rc0