summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-02-06Release 3.13.1Tavian Barnes
2024-02-06opt: Enable BFTW_STAT when profitableTavian Barnes
2024-02-06ctx: Fill in ctx->threads earlierTavian Barnes
2024-02-06color: New API to check if stat() is necessaryTavian Barnes
2024-02-06bftw: stat() files asynchronouslyTavian Barnes
2024-02-05mtab: Take the basename directly in bfs_might_be_mount()Tavian Barnes
This avoids some hot xbaseoff() calls.
2024-02-05tests: Fix --stopTavian Barnes
2024-02-04build: Rename test targetsTavian Barnes
2024-02-03ci/macos: Try the new M1 runnerTavian Barnes
2024-02-03tests: Run more integration tests by defaultTavian Barnes
The traversal behaviour of -j1, -j2, and -jN (N >= 3) are all different enough to be worth running the whole test suite against them. Sorting (-s) is another dimension worth testing. Having these tests run automatically would have caught some recently-fixed bugs earlier.
2024-02-03tests: Implement jobserver inheritanceTavian Barnes
2024-02-01tests: Don't clobber inherited FDsTavian Barnes
Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them.
2024-02-01tests: Use variable redirections to dup std{out,err}Tavian Barnes
Previously, we hardcoded file descriptors 3 and 4 for duplicating stdandard output/error respectively. In preparation for keeping inherited FDs open, switch to using bash's variable redirection feature to dynamically assign FDs. This feature is only available from bash 4.1 onwards, so this marks the end of our support for bash 3. macOS users will need to install a modern bash version to run our tests.
2024-02-01ci/freebsd: Use the system compilerTavian Barnes
Release builds work now on FreeBSD 14.
2024-02-01bftw: Always block in bftw_pop_dir() with multiple threadsTavian Barnes
2024-02-01bftw: Don't immediately pin open directoriesTavian Barnes
It is undesirable to close a directory that we haven't read yet to free up cache capacity, but it's worse to fail to open the next directory because too many upcoming directories are pinned. This could happen when sorting, because then we can't prioritize the already-opened ones.
2024-02-01bftw: Allow forcing bfs_dir allocation from the main threadTavian Barnes
When sorting, we can be forced to pop an unopened directory. If enough other directories are already open, that can lead to ENOMEM when we try to open it synchronously. To avoid this, force allocations from the main thread to be attempted even if they would go over the limit. Also, fix the accounting in bftw_allocdir() if allocation fails.
2024-02-01bftw: Kill trivial bftw_queue_balance() helperTavian Barnes
2024-02-01bfstd: Don't shadow FreeBSD's fflags_tTavian Barnes
2024-01-31bftw: Actually stop if the callback returns BFTW_STOPTavian Barnes
Otherwise, bftw_ids() or bftw_eds() might keep going! Fixes: 5f16169 ("bftw: Share the bftw_state between iterations of ids/eds")
2024-01-31opt: Charge eval_flags() for a stat() callTavian Barnes
2024-01-31bftw: Optimize -s -j2 searchesTavian Barnes
Maintaining balance and strict ordering at the same time forces too much work onto the main thread.
2024-01-31bftw: Use a bftw_queue for files tooTavian Barnes
2024-01-31bftw: New bftw_queue abstractionTavian Barnes
2024-01-30list: Return the next cursor from SLIST_INSERT()Tavian Barnes
2024-01-22eval: Squelch an uninitialized variable warningTavian Barnes
2024-01-18ioq: Implement ioq_stat()Tavian Barnes
2024-01-18ioq: Refactor to take advantage of -WswitchTavian Barnes
2024-01-18stat: Expose bfs_{fstatat,statx}_flags()Tavian Barnes
2024-01-18stat: Expose bfs_stat{,x}_convert()Tavian Barnes
2024-01-17tests/posix: Avoid catastrophic backtrackingTavian Barnes
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.
2024-01-17xspawn: Check for _POSIX_SPAWN in bfs_spawn_addfchdir()Tavian Barnes
2024-01-17fsade: Mark bfs_acl_tag_type() as maybe_unusedTavian Barnes
It's not used on at least macOS, which doesn't have ACL_{USER,GROUP}_OBJ or ACL_OTHER.
2024-01-13tests: Properly filter escape sequences with --verbose=testsTavian Barnes
2024-01-13ioq: Use the negative errno conventionTavian Barnes
2024-01-13bfstd: New {error,errno}_is_like() functionsTavian Barnes
We used to have is_nonexistence_error() to consistently treat ENOENT and ENOTDIR the same. Recently, we started considering EFAULT the same as ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both of these behind a more generic interface.
2024-01-13tests.h: Add a header guardTavian Barnes
2024-01-12tests: Merge unit test executables into oneTavian Barnes
2024-01-11tests: New output formatTavian Barnes
2024-01-09ci: Add an OmniOS builderTavian Barnes
2024-01-09tests: Don't do chmod +sTavian Barnes
POSIX says > When using the symbolic mode form on a regular file, it is > implementation-defined whether or not: > > - Requests to set the set-user-ID-on-execution or set-group-ID-on- > execution bit when all execute bits are currently clear and none > are being set are ignored. And indeed, illumos ignores them with a warning: chmod: WARNING: /tmp/bfs.XXXX7KaGWb/rainbow/suid: Execute permission required for set-ID on execution Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html
2024-01-09config: Disable sys/acl.h on illumosTavian Barnes
Their ACL API is quite a bit different from most. Link: https://illumos.org/man/2/acl
2024-01-09build: Link with -lsocket -lnsl on illumosTavian Barnes
Link: https://illumos.org/man/3SOCKET/bind
2024-01-09build: Define _POSIX_PTHREAD_SEMANTICS for illumosTavian Barnes
Needed for the POSIX-compliant version of some interfaces. Link: https://illumos.org/man/3C/getpwnam
2024-01-07tests/bfs/D_opt: New test for more -D opt coverageTavian Barnes
2024-01-07eval: Check for xbasename() allocation failureTavian Barnes
2024-01-07expr: Make expressions variadicTavian Barnes
Rather than only unary/binary expressions, we now support an arbitrary number of children. The optimizer has been re-written almost completely and now supports optimal reordering of longer expression chains, rather than just arm-swapping. Fixes #85.
2024-01-07list: New SLIST_HEAD() and SLIST_TAIL() macrosTavian Barnes
2024-01-04ci: Add a DragonFly BSD jobTavian Barnes
2024-01-04Work around DragonFly BSD kernel bugTavian Barnes
DragonFly's x86_64 assembly implementation of copyinstr() checks the wrong pointer when deciding whether to return EFAULT or ENAMETOOLONG, causing it to always return EFAULT for overlong paths. Work around it by treating EFAULT the same as ENAMETOOLONG on DragonFly. Link: https://twitter.com/tavianator/status/1742991411203485713