aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/file/path_test.c
Commit message (Collapse)AuthorAgeFilesLines
* path_test: adjust test for open(O_PATH | O_CREAT)Konstantin Belousov2025-01-071-2/+6
| | | | | | | | | Instead of failing, it must succeed now. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48332
* path_test: fix cap_rights_init usageEd Maste2024-02-151-3/+3
| | | | | | | | | | Capability rights passed to cap_rights_* are not simple bitmaks and cannot be ORed together in general (although it will work for certain subsets of rights). PR: 277057 Fixes: e5e1d9c7b781 ("path_test: Add a test case for...") Sponsored by: The FreeBSD Foundation
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* path_test: Add a test case for openat(O_EMPTY_PATH) in capability modeMark Johnston2023-03-221-0/+75
| | | | MFC after: 1 week
* path_test: Verify that operations on unlinked files workMark Johnston2022-04-181-0/+33
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* path_test: Correct the kevent testMark Johnston2022-04-181-2/+5
| | | | | | | | | | | | | | | | | | Perhaps surprisingly, and contrary to the expectations of path_test:path_event, NOTE_LINK events are not raised when a file is unlinked. Prior to commit bf13db086b84, the test happened to work because unlinking the file would cause the vnode to be recycled, and EVFILT_VNODE knotes deliver an event with EV_EOF set when the vnode is doomed. Since the test did not verify the note type, the test succeeded. After commit bf13db086b84, the vnode is not recycled after being unlinked and so the test hangs. Fix the test by waiting for NOTE_DELETE instead, and check that we got the note that we expected. Reported by: Jenkins MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Have path_test ask the kernel for the page sizeAndrew Turner2022-04-071-3/+5
| | | | | | | It may be dynamic so we can't rely on PAGE_SIZE being present or correct. Sponsored by: The FreeBSD Foundation
* vfs: Permit unix sockets to be opened with O_PATHMark Johnston2021-09-171-4/+28
| | | | | | | | | | | | | | | | | As with FIFOs, a path descriptor for a unix socket cannot be used with kevent(). In principle connectat(2) and bindat(2) could be modified to support an AT_EMPTY_PATH-like mode which operates on the socket referenced by an O_PATH fd referencing a unix socket. That would eliminate the path length limit imposed by sockaddr_un. Update O_PATH tests. Reviewed by: kib MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31970
* path_test: Fix test sortingMark Johnston2021-09-081-20/+20
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* path_test: Fix the unix socket testMark Johnston2021-09-081-1/+1
| | | | | | | The intent was to specify O_PATH to open(2). MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Add test for fstatat(pipefd, AT_EMPTY_PATH)Konstantin Belousov2021-08-141-0/+20
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* path_test: Add a few new test casesMark Johnston2021-05-041-0/+100
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Add some regression tests for O_PATH and AT_EMPTY_PATHMark Johnston2021-04-151-0/+778
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29719