summaryrefslogtreecommitdiffstats
path: root/tests/posix
Commit message (Collapse)AuthorAgeFilesLines
* parse: Take umask into account in parse_mode()Tavian Barnes2024-08-023-0/+18
| | | | | | | POSIX 2024 clarified that find(1) is meant to work exactly like chmod(1) here, so for modes like +rw,-x with no "who" specified, apply the umask. Link: https://www.austingroupbugs.net/view.php?id=1392
* tests: Add more files to perms/Tavian Barnes2024-08-029-20/+57
|
* tests: Add tests for invalid users/groupsTavian Barnes2024-07-274-0/+4
|
* tests: Make more tests POSIX-compliantTavian Barnes2024-07-238-0/+46
|
* Implement POSIX 2024's -mountTavian Barnes2024-07-084-0/+29
| | | | | | This reverts commit 4f80c17192f2b28c96a489969d4435151d68d0ce. Link: https://www.austingroupbugs.net/view.php?id=1133
* tests: -print0 is in POSIX 2024Tavian Barnes2024-07-082-0/+2
| | | | Link: https://www.austingroupbugs.net/view.php?id=243
* tests: -iname is in POSIX 2024Tavian Barnes2024-07-082-0/+5
| | | | Link: https://www.austingroupbugs.net/view.php?id=1031
* tests: New inaccessible/ directory tree for permission errorsTavian Barnes2024-06-044-18/+7
|
* tests: Add directories with different permissions to perms/Tavian Barnes2024-06-048-16/+20
|
* parse: Handle multiple flags at once like -LEXO2Tavian Barnes2024-06-034-0/+20
| | | | | | | | | | | | | | | | | | | | | The POSIX Utility Syntax Guidelines specify that flag groups like -HL should be handled like -H -L. GNU find doesn't support grouping flags in this way, but BSD find does. To avoid conflicts with non-flag primaries, for now we require at least one flag in a group to be a capital letter. That is, we support things like -Lds but not -ds. We also do not support -fPATH (without a space) as it would conflict with -follow, -fprint, etc. It is impossible to be compatible with both GNU and BSD find here: user@gnu$ find -follow link link/file ... user@bsd$ find -follow find: ollow: No such file or directory Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
* tests/posix: Add a test for -prune with EACCESSTavian Barnes2024-05-272-0/+9
| | | | Link: https://savannah.gnu.org/bugs/?60207
* tests: Move newer_link out of posix/Tavian Barnes2024-04-093-1/+4
| | | | | | | | POSIX has clarified that it's unspecified whether -newer uses times from stat() or lstat(), because implementations vary. It does specify that it must fall back to lstat() for broken links, so test that. Link: https://austingroupbugs.net/view.php?id=1776
* tests: Don't clobber inherited FDsTavian Barnes2024-02-015-20/+20
| | | | | Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them.
* tests/posix: Avoid catastrophic backtrackingTavian Barnes2024-01-172-11/+2
| | | | | | Using -path 'deep/*/*/.../*' to simulate -mindepth 18 falls off a performance cliff on systems that use backtracking for fnmatch(). This was observed on macOS 12.4. Instead, just use -type f.
* tests/posix/name_bracket: Skip on NetBSD tooTavian Barnes2024-01-031-2/+6
|
* tests: Add tests for ulimit -n after -execTavian Barnes2023-11-022-0/+18
|
* tests: Fix Bash 3 compatibilityTavian Barnes2023-10-233-11/+6
|
* tests: Use test-specific scratch directoriesTavian Barnes2023-10-2213-72/+75
|
* tests: Refactor implementation into separate filesTavian Barnes2023-10-193-4/+0
|
* tests: New defer functionTavian Barnes2023-10-197-7/+11
|
* dir: Fix FreeBSD union mountsTavian Barnes2023-10-174-0/+28
|
* tests: Move closed_std* tests out of the POSIX groupTavian Barnes2023-10-144-22/+0
| | | | | | | | | | | | | POSIX actually says > If the utility would be executed with file descriptor 0, 1, or 2 > closed, implementations may execute the utility with the file > descriptor open to an unspecified file. So we're not guaranteed to be able to detect the situation in the first place. Add a best-effort check for these platforms and skip the test. Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
* tests: Use bfs_sudo wrapper instead of testing $SUDOTavian Barnes2022-12-293-9/+6
|
* tests: Fail early in bfs_diff if the diff failsTavian Barnes2022-12-164-4/+4
| | | | Otherwise, propagate the exit code from bfs
* tests: Turn on set -eTavian Barnes2022-12-169-31/+20
|
* tests: Move crash detection into invoke_bfs, use ! instead of failTavian Barnes2022-12-169-9/+9
|
* tests: Replace skip_unless test with test || skipTavian Barnes2022-12-165-9/+9
|
* tests/posix/readdir_error: Fix flakinessTavian Barnes2022-12-141-7/+23
|
* tests: Add a test for readdir() errorsTavian Barnes2022-12-131-0/+21
|
* exec: Fix index overflow parsing -exec +Tavian Barnes2022-11-112-0/+4
|
* pwcache: Fill the user/group caches lazilyTavian Barnes2022-11-092-2/+11
| | | | | | | Iterating all the users/groups can be expensive, especially with NSS. Android has so many that it doesn't even return them all from get{pw,gr}ent() for performance reasons, leading to incorrect behaviour of -user/-group/etc.
* tests/xtouch: New utilityTavian Barnes2022-11-074-4/+4
| | | | | | POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't implement it. Making our own utility also lets us add some handy extensions like -p (create parents) and -M (set permissions).
* tests: Add a helper for cleaning scratchTavian Barnes2022-10-204-5/+5
| | | | And try to unmount things if the a test left them mounted.
* tests: Coverage number go upTavian Barnes2022-10-191-0/+1
|
* tests: Split test cases into separate filesTavian Barnes2022-10-19192-0/+912