summaryrefslogtreecommitdiff
path: root/modules/access-tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-10-07 01:42:11 +0200
committerBruno Haible <bruno@clisp.org>2019-10-07 01:42:11 +0200
commit1eb7b25df1976fa852ddd7ea0ae26ec670146ce7 (patch)
tree686ef04b50fdfc070819cf36ee01508f5ac3a529 /modules/access-tests
parent4f027501ea35f8075192e360ac45c641ebad18dc (diff)
downloadgnulib-1eb7b25df1976fa852ddd7ea0ae26ec670146ce7.tar.gz
access tests: Fix test failure when run as root.
* tests/test-access.c: Include root-uid.h. (geteuid): Define fallback. (main): Don't expect that writing to a read-only file would fail when running as root. Also, remove the created files at the end. * modules/access-tests (Depends-on): Add root-uid. (configure.ac): Test whether geteuid exists.
Diffstat (limited to 'modules/access-tests')
-rw-r--r--modules/access-tests2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/access-tests b/modules/access-tests
index 082aeb58b1..4b35c21150 100644
--- a/modules/access-tests
+++ b/modules/access-tests
@@ -5,8 +5,10 @@ tests/macros.h
Depends-on:
creat
+root-uid
configure.ac:
+AC_CHECK_FUNCS_ONCE([geteuid])
Makefile.am:
TESTS += test-access