summaryrefslogtreecommitdiffstats
path: root/tests.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests.sh: Better line overwritingTavian Barnes2017-07-181-5/+4
| | | | | This way the cursor is always at the beginning of the line, so any error output is more readable.
* tests.sh: Make closefrom() behave like its namesakeTavian Barnes2017-07-181-3/+3
|
* tests.sh: Close extraneous fds for tests that depend on ulimitTavian Barnes2017-07-161-0/+17
|
* Handle ENOTDIR the same as ENOENTTavian Barnes2017-07-091-0/+10
| | | | | | For a/b/c, ENOTDIR is returned instead of ENOENT if a or b are not directories. Handle this uniformly when detecting broken symlinks, readdir races, etc.
* bftw: Fix ENAMETOOLONG handling when the root is closedTavian Barnes2017-07-081-2/+10
| | | | | The root has depth == 0, but we still need to include it in the components array.
* bftw: Recover from ENAMETOOLONGTavian Barnes2017-07-081-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | It is always possible to force a breadth-first traversal to encounter ENAMETOOLONG, regardless of the dircache eviction policy. As a concrete example, consider this directory structure: ./1/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... (longer than {PATH_MAX}) ./2/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... ./3/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... ... (more than RLIMIT_NOFILE directories under .) Eventually, the next file to be processed will not have any parents in the cache, as the cache can only hold RLIMIT_NOFILE entries. Then the whole path must be traversed from ., which will exceed {PATH_MAX} bytes. Work around this by performing a component-by-component traversal manually when we see ENAMETOOLONG. This is required by POSIX: > The find utility shall be able to descend to arbitrary depths in a file > hierarchy and shall not fail due to path length limitations (unless a > path operand specified by the application exceeds {PATH_MAX} > requirements).
* -perm: Handle permcopy (e.g. u=rw,g=u) correctlyTavian Barnes2017-06-151-0/+5
|
* tests: Fix test_printf_nul with non-GNU sortTavian Barnes2017-06-111-1/+7
| | | | | Other UNIX sort implementations seem to truncate at the nul bytes, so open-code it without the sort.
* printf: Fix embedded nul bytesTavian Barnes2017-06-101-0/+6
| | | | Fixes #26.
* Don't make -quit disable the implicit -printTavian Barnes2017-05-111-2/+7
|
* Release 1.01.0Tavian Barnes2017-04-241-0/+11
|
* Implement -fstypeTavian Barnes2017-04-231-0/+6
| | | | Fixes #6!
* tests.sh: Allow individual tests to be specified on the command lineTavian Barnes2017-04-161-10/+16
|
* Implement -XTavian Barnes2017-04-161-0/+7
|
* tests: Add tests for bfs extensions to -exec ... +Tavian Barnes2017-04-161-0/+10
|
* Implement -exec/-execdir ... +Tavian Barnes2017-04-151-0/+10
|
* tests.sh: Use eval instead of declare -gTavian Barnes2017-04-081-1/+1
| | | | Turns out declare -g is from Bash 4 too.
* tests: Run everything in UTCTavian Barnes2017-03-111-1/+2
|
* Add a test for colored outputTavian Barnes2017-03-111-0/+5
|
* Implement -printf %Ak, %Ck, and %TkTavian Barnes2017-03-111-1/+6
|
* tests: Print the count of passing and failing testsTavian Barnes2017-02-111-13/+14
|
* Add some tests for the operators themselvesTavian Barnes2017-02-111-10/+50
|
* Add tests for bfs's flexible command line parsingTavian Barnes2017-02-101-0/+25
|
* tests: Don't require bash associative arraysTavian Barnes2017-02-101-22/+11
| | | | That's a bash 4 feature, while macOS is stuck on bash 3.
* bftw: Make the nameoff of "///" point to "/"Tavian Barnes2017-02-091-1/+2
| | | | This simplifies a few things such as -name handling for ///.
* Give the test cases human-readable namesTavian Barnes2017-02-091-312/+433
|
* Don't close stdin for -ok or -okdirTavian Barnes2017-02-091-6/+7
| | | | Turns out it violates POSIX, even though GNU find does it.
* Add support for -x?type with multiple typesTavian Barnes2017-02-081-1/+11
| | | | This functionality is already part of GNU findutils git.
* Fix a memory leak parsing -printfTavian Barnes2017-02-061-1/+7
|
* tests.sh: Set the umask before creating the test treesTavian Barnes2017-02-061-0/+1
|
* Make -quit happen immediately, not at the end of the current expressionTavian Barnes2017-02-051-1/+11
|
* bftw: Compute nameoff correctly for the root in BFTW_DEPTH modeTavian Barnes2017-02-051-1/+5
|
* Implement -printf/-fprintfTavian Barnes2017-02-051-9/+42
| | | | | Based on a patch by Fangrui Song <i@maskray.me>. Closes #16.
* Implement -nouser and -nogroupTavian Barnes2017-02-041-1/+18
|
* tests: Add a test for -inumTavian Barnes2017-01-031-1/+8
|
* tests: Add tests for -quitTavian Barnes2017-01-021-1/+21
|
* Set _FILE_OFFSET_BITS to 64Tavian Barnes2016-12-211-1/+6
| | | | | With the new support for -size n[TP], this is needed to avoid overflow on 32-bit platforms.
* Implement -mnewerTavian Barnes2016-12-201-1/+11
|
* Support -[gu]id NAME like BSD findTavian Barnes2016-12-201-1/+11
|
* Implement BSD find's -depth NTavian Barnes2016-12-181-1/+31
|
* tests: Allow limiting the testsuite to POSIX, BSD, GNU, and bfs-specific ↵Tavian Barnes2016-12-181-11/+128
| | | | features
* tests.sh: Let the bfs binary be specified on the command lineTavian Barnes2016-12-181-21/+35
|
* Implement -regex, -iregex, and -regextype/-ETavian Barnes2016-12-181-1/+29
|
* tests: Fix failure when /tmp is a symlink.Tavian Barnes2016-12-081-1/+4
|
* tests: Don't use install -DTavian Barnes2016-12-081-7/+14
| | | | -D is a GNU-ism that doesn't work on BSD or macOS.
* tests: Don't check -size for directoriesTavian Barnes2016-12-051-3/+4
|
* tests: Don't check -links for directoriesTavian Barnes2016-12-051-3/+3
|
* Allow // to be different from /Tavian Barnes2016-11-241-3/+2
| | | | | | POSIX says that // may be resolved in an implementation-defined way (generally, to access network shares). So don't use it in tests, and don't canonicalize it to '/' in -execdir.
* tests: Make sure the temporary directory is owned by the current user/groupTavian Barnes2016-11-221-0/+1
| | | | | BSDs apparently prefer to create new files/directories with the same group as the parent directory, rather than the current primary group.
* tests: Mkae LC_ALL=C apply to the whole pipeline when sorting.Tavian Barnes2016-11-221-1/+4
|