summaryrefslogtreecommitdiff
path: root/modules/fcntl-safer-tests
Commit message (Collapse)AuthorAgeFilesLines
* open, openat: Really support O_CLOEXEC.Bruno Haible2020-05-241-0/+1
| | | | | | | | | | | * lib/open.c (open): When have_cloexec is still undecided, do pass a O_CLOEXEC flag to orig_open. * lib/openat.c (rpl_openat): When have_cloexec is still undecided, do pass a O_CLOEXEC flag to orig_openat. * tests/test-open.h (test_open): Verify that O_CLOEXEC is honoured. * modules/open-tests (Depends-on): Add fcntl. * modules/openat-tests (Depends-on): Likewise. * modules/fcntl-safer-tests (Depends-on): Likewise.
* Refactor common macros used in tests.Bruno Haible2009-12-241-0/+1
|
* open: detect FreeBSD bugEric Blake2009-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
* test-fcntl-safer: split from test-openEric Blake2009-08-211-0/+11
* tests/test-open.c (main): Move... * tests/test-open.h: ...into new file. * tests/test-fcntl-safer.c: New file. * modules/open-tests (Files): Add test-open.h. * modules/fcntl-safer-tests: New file. Suggested by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>