summaryrefslogtreecommitdiff
path: root/modules/open-tests
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-11-07 21:34:32 -0700
committerEric Blake <ebb9@byu.net>2009-11-09 06:36:00 -0700
commit48e988340f85e568ceb9ac1f4bf5824fddf1fd0d (patch)
tree1c6d25b4261bcdb2b10fb8908c2f7e81f98041cf /modules/open-tests
parent349396ebfcce12ee8f927fedf82067414c427093 (diff)
downloadgnulib-48e988340f85e568ceb9ac1f4bf5824fddf1fd0d.tar.gz
open: detect FreeBSD bug
open("link-to-file/", O_RDONLY) mistakenly succeeds. The previous patch was enough to fix utimens when no fd is involved, but this is necessary for futimens to pass. * m4/open.m4 (gl_FUNC_OPEN): Also detect FreeBSD bug with slash on symlink. * doc/posix-functions/open.texi (open): Document the bug. * doc/posix-functions/utimes.texi (utimes): Likewise. * tests/test-open.h (test_open): Add parameters, and test symlink handling. * tests/test-open.c (main): Adjust caller. * tests/test-fcntl-safer.c (main): Likewise. * modules/open-tests (Depends-on): Add stdbool, symlink. * modules/fcntl-safer-tests (Depends-on): Likewise. * tests/test-openat.c (main): Add test-open tests. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/open-tests')
-rw-r--r--modules/open-tests3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/open-tests b/modules/open-tests
index 42aa93c02d..16d4a99ec8 100644
--- a/modules/open-tests
+++ b/modules/open-tests
@@ -3,10 +3,11 @@ tests/test-open.h
tests/test-open.c
Depends-on:
+stdbool
+symlink
configure.ac:
Makefile.am:
TESTS += test-open
check_PROGRAMS += test-open
-