Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bfstd: Add some more integer parsing functionsHEADmain | Tavian Barnes | 5 days | 7 | -54/+218 |
| | |||||
* | tests/bfstd: Add some xstrtox() tests | Tavian Barnes | 5 days | 1 | -0/+65 |
| | |||||
* | tests/bfstd: Factor tests into separate functions | Tavian Barnes | 5 days | 1 | -25/+42 |
| | |||||
* | configure: Work around a Bash 3 bug | Tavian Barnes | 6 days | 1 | -1/+3 |
| | | | | | | | | | | | | | Before Bash 4, the `command` builtin did not work properly in AND-OR lists when set -e was active, leading to set -e command nonesuch || echo none failing without echoing. Work around it by runing `command nproc` in a subshell. Link: https://stackoverflow.com/q/68143965 | ||||
* | tests: Switch from unbuffer to ptyx | Tavian Barnes | 7 days | 4 | -22/+5 |
| | | | | | | | | | | | | | | | | unbuffer is part of expect, which is not actively maintained. This recently led to a CI failure on NetBSD which looked like can't find package Expect while executing "package require Expect" (file "/usr/pkg/bin/unbuffer" line 6) Rather than debug this, I just reimplemented unbuffer myself. This also reduces our test dependencies, which is nice. Link: https://sourceforge.net/p/expect/bugs/107/ Link: https://github.com/tavianator/bfs/actions/runs/14421150823/job/40444068385 | ||||
* | tests/ptyx: New utility to run a command in a pty | Tavian Barnes | 7 days | 2 | -0/+261 |
| | |||||
* | bfstd: Add a tcsetwinsize() polyfill | Tavian Barnes | 8 days | 4 | -0/+23 |
| | |||||
* | bfstd: Add a tcgetwinsize() polyfill | Tavian Barnes | 8 days | 3 | -34/+40 |
| | |||||
* | configure: Fix make bench in out-of-tree builds | Tavian Barnes | 12 days | 1 | -1/+1 |
| | | | | Fixes: 3678c2e ("bench/ioq: New ioq microbenchmark") | ||||
* | ctx: Don't leak ctx->kinds | Tavian Barnes | 2025-04-03 | 1 | -0/+1 |
| | | | | Fixes: 9c911d7 ("ctx: Track the token kind of each argument") | ||||
* | parse: Disallow -files0-from with explicit roots | Tavian Barnes | 2025-04-01 | 2 | -0/+20 |
| | | | | This matches the behaviour of GNU find. | ||||
* | ctx: Track the token kind of each argument | Tavian Barnes | 2025-04-01 | 3 | -0/+22 |
| | |||||
* | parse: Only process the last -files0-from | Tavian Barnes | 2025-04-01 | 14 | -61/+168 |
| | | | | | | | | GNU find intentionally makes later -files0-from options override earlier ones, for symmetry with similar features like du --files0-from. Change bfs to match. Link: https://savannah.gnu.org/bugs/?66965 | ||||
* | color: New %p[xX] formats for expressions in diagnostics | Tavian Barnes | 2025-04-01 | 4 | -36/+66 |
| | |||||
* | parse: Track expressions, not just strings, for conflict reporting | Tavian Barnes | 2025-03-30 | 7 | -59/+137 |
| | |||||
* | list: Switch back to the memcpy()/memset() SLIST_REMOVE() implementation | Tavian Barnes | 2025-03-29 | 1 | -19/+12 |
| | | | | | | | | | The thread-local scratch variables make it non-reentrant for no good reason. I don't consider the theoretical strict-aliasing violation to be practically relevant. This partially reverts commit 90791fc ("list: Make SLIST_REMOVE() more type-safe"). | ||||
* | tests/posix: New test for -exec return value | Tavian Barnes | 2025-03-25 | 2 | -0/+19 |
| | |||||
* | bench/ioq: Use nproc() | Tavian Barnes | 2025-03-12 | 1 | -1/+1 |
| | |||||
* | bfstd: Fix nproc() on systems without dynamically sized CPU masks | Tavian Barnes | 2025-03-10 | 1 | -2/+14 |
| | | | | Notes: Fixes: a36774b ("bfstd: Take sched_getaffinity() into account in nproc()") | ||||
* | build/flags: Add -lrt on FreeBSD for timer_create() | Tavian Barnes | 2025-03-10 | 1 | -0/+1 |
| | | | | Notes: Fixes: 881d590 ("xtime: Add a wrapper for timer_create()/setitimer()") | ||||
* | tests/xtime: Don't waste time checking the system's timegm() | Tavian Barnes | 2025-03-10 | 1 | -2/+9 |
| | | | | Just check our wrapper's error detection, like we do for xmktime(). | ||||
* | tests: Add missing #include <sys/wait.h> | Tavian Barnes | 2025-03-10 | 1 | -0/+1 |
| | | | | Notes: Fixes: 1aefb83 ("tests/units: Run each test in a separate process") | ||||
* | diag: Don't leave unused assertion messages in the binary | Tavian Barnes | 2025-03-04 | 2 | -14/+27 |
| | | | | | Rather than hiding them with %.0s, use a ternary to replace them with an empty string if they would be unused. | ||||
* | diag: Get rid of struct bfs_location | Tavian Barnes | 2025-03-04 | 5 | -70/+56 |
| | | | | | | | | Just add the standard prefix to the passed format string in the diagnostic macros themselves. This lets us write the whole message with one dprintf() call, minimizing interleaving. It's also a net win for binary size. | ||||
* | tests/units: Run each test in a separate process | Tavian Barnes | 2025-02-27 | 1 | -27/+161 |
| | |||||
* | bfstd: Take sched_getaffinity() into account in nproc() | Tavian Barnes | 2025-02-27 | 3 | -5/+58 |
| | |||||
* | bfstd: New nproc() function | Tavian Barnes | 2025-02-27 | 3 | -15/+21 |
| | |||||
* | Release 4.0.64.0.6 | Tavian Barnes | 2025-02-26 | 3 | -2/+22 |
| | |||||
* | Micro-optimize word-at-a-time loop tails | Tavian Barnes | 2025-02-21 | 2 | -10/+14 |
| | | | | | | Compilers apparently aren't smart enough to infer that the odd tail length fixup "loops" run at most once, and could be converted to ifs, so do that manually. | ||||
* | tests/gnu/fls_overflow: Skip if the FS doesn't support 64-bit times | Tavian Barnes | 2025-02-21 | 1 | -1/+1 |
| | | | | Notes: Fixes: dd5df1f ("eval: Don't error out in -ls if the time overflows") | ||||
* | ioq: Fix typo in comment | Tavian Barnes | 2025-02-18 | 1 | -1/+1 |
| | |||||
* | tests/xspawn: Test bfs_spawn_resolve() with a relative $PATH | Tavian Barnes | 2025-02-18 | 1 | -26/+62 |
| | |||||
* | trie: Use load8_beu*() for trie_mismatch() | Tavian Barnes | 2025-02-13 | 1 | -29/+23 |
| | |||||
* | bfstd: Use load8_leu*() for asciinlen() | Tavian Barnes | 2025-02-13 | 1 | -24/+20 |
| | |||||
* | bit: Add the load8_[bl]euN() utilities | Tavian Barnes | 2025-02-13 | 2 | -2/+63 |
| | |||||
* | trie: Make nibble indices big-endian | Tavian Barnes | 2025-02-13 | 2 | -7/+11 |
| | | | | Otherwise the order doesn't match lexicographical order on bytes. | ||||
* | tests/xtouch: Use xstrtol() | Tavian Barnes | 2025-02-13 | 1 | -5/+2 |
| | |||||
* | trie: New trie_node_size() helper | Tavian Barnes | 2025-02-13 | 1 | -3/+9 |
| | |||||
* | configure: Add separate --enable-lto knob | Tavian Barnes | 2025-02-13 | 2 | -3/+9 |
| | |||||
* | configure: Add warn() helper function | Tavian Barnes | 2025-02-12 | 1 | -6/+13 |
| | |||||
* | trie: Clean up some bounds checking | Tavian Barnes | 2025-02-12 | 1 | -6/+6 |
| | |||||
* | trie: Micro-optimize trie_representative() | Tavian Barnes | 2025-02-11 | 1 | -4/+5 |
| | | | | | popcount(map & (bit - 1) & mask) has a longer critical path than popcount(map & (bit - 1)) & mask. | ||||
* | tests: Don't shell out to tr just to replace slashes with dashes | Tavian Barnes | 2025-02-07 | 1 | -3/+1 |
| | |||||
* | tests: Make --no-clean listen to $NO_COLOR | Tavian Barnes | 2025-02-07 | 1 | -1/+1 |
| | |||||
* | tests/color: Use /dev/tty over $TTY | Tavian Barnes | 2025-02-07 | 1 | -2/+2 |
| | | | | | | | | | | | | | $TTY is the actual TTY, e.g. /dev/pts/3, which may not be accessible by the current user. This can happen e.g. if the PTY is owned by root, who then does root@host# su user user@host$ ./tests/tests.sh ./tests/color.sh: line 81: /dev/pts/3: Permission denied Notes: Fixes: 59b1c52 ("tests: Print progress outside the scroll region") | ||||
* | eval: Don't error out in -ls if the time overflows | Tavian Barnes | 2025-02-07 | 2 | -19/+34 |
| | |||||
* | tests: Use $EPOCHSECONDS if it exists | Tavian Barnes | 2025-02-07 | 1 | -2/+7 |
| | | | | | | | Bash 5 adds that special variable, which should be more reliable than the awk trick, which is known to be broken on mawk. Fixes: https://github.com/tavianator/bfs/issues/152 | ||||
* | ioq: Use getppid() for the heavy NOP syscall | Tavian Barnes | 2025-02-06 | 1 | -1/+1 |
| | | | | | | | | getpid() could hypothetically be cached (and glibc used to do it). getppid() can't be, because the parent could die and reparent the child to init. Link: https://lore.kernel.org/linux-mm/Z58dIOGlJ3grsAge@casper.infradead.org/ | ||||
* | mtab: Use mount IDs instead of dev_t for bfs_fstype() | Tavian Barnes | 2025-02-06 | 3 | -2/+31 |
| | | | | | | | | | This fixes -fstype on btrfs subvolumes, which previously reported "unknown" due to their dev_t being potentially different from the mount point. Link: https://savannah.gnu.org/bugs/?50859 Link: https://lwn.net/Articles/866582/ | ||||
* | stat: Expose mount IDs from statx() | Tavian Barnes | 2025-02-06 | 3 | -2/+40 |
| |