Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | tests/sighook: Add atsigexit() tests | Tavian Barnes | 6 days | 1 | -1/+77 |
| | |||||
* | tests/sighook: Test the SH_ONESHOT flag | Tavian Barnes | 2024-12-04 | 1 | -2/+28 |
| | |||||
* | ioq: Submit and pop requests in batches | Tavian Barnes | 2024-12-03 | 1 | -0/+1 |
| | | | | | The new ioq_submit() function is now necessary to call to ensure the pending request batch is flushed. | ||||
* | tests/getopts: Remove unused variable | Tavian Barnes | 2024-11-21 | 1 | -1/+0 |
| | |||||
* | sanity: Don't mark memory uninit in sanitize_{alloc,free}() | Tavian Barnes | 2024-11-02 | 1 | -10/+34 |
| | | | | | We might want to change the size of an allocated region without changing which bytes are initialized. | ||||
* | alloc: Stop supporting pathological flexible array ABIs | Tavian Barnes | 2024-11-02 | 1 | -4/+0 |
| | |||||
* | alloc: Don't require size % align == 0 | Tavian Barnes | 2024-11-02 | 1 | -0/+8 |
| | | | | | | | | | Allowing unaligned sizes will allow us to allocate aligned slabs with additional metadata in the tail without ballooning the allocation size for large alignments. Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm#dr_460 Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2072.htm | ||||
* | color: Handle bfs_check_capabilities error code (-1) in cpath_has_capabilities | Jody Frankowski | 2024-10-31 | 4 | -0/+42 |
| | | | | | | | | | | | On non-Linux systems, bfs_check_capabilities always returned -1, so cpath_has_capabilities would always return true. If bfs was called with an LS_COLORS containing the `ca` statement, e.g. `ca=30;41`, bfs would color ALL the files. While including the `ca` statement in LS_COLORS on non-Linux systems is unusual, this is not an error and is a valid use-case (e.g. Using GNU ls or lsd). Fixes: 1520d4d3 ("color: Don't color files like directories on ENOTDIR") | ||||
* | bit: Add bswap() overloads for every primitive type | Tavian Barnes | 2024-10-27 | 1 | -0/+7 |
| | | | | Fixes: https://github.com/tavianator/bfs/issues/145 | ||||
* | tests/posix: Add a test for overly aggressive -exec {} + matching | Tavian Barnes | 2024-10-27 | 2 | -0/+33 |
| | | | | Link: https://savannah.gnu.org/bugs/?66365 | ||||
* | color: Don't color files like directories on ENOTDIR | Tavian Barnes | 2024-10-16 | 1 | -2/+2 |
| | |||||
* | color: Fix an infinite loop colorizing some invalid paths | Tavian Barnes | 2024-10-13 | 2 | -0/+2 |
| | | | | | | | | | | | | | | Previously, given $ touch file $ ln -s file/file notdir $ bfs notdir/file bfs would loop forever when printing the error message, since it expected stripping the trailing slash from "notdir/" to fix the ENOTDIR error, but the broken symlink still gave the same error. Fixes: b4c3201 ("color: Only highlight the trailing slash on ENOTDIR") | ||||
* | tests/gnu: Test -L -printf %Y | Tavian Barnes | 2024-10-10 | 2 | -0/+18 |
| | |||||
* | tests/trie: Improve code coverage | Tavian Barnes | 2024-10-10 | 1 | -1/+4 |
| | |||||
* | sighook: Don't forget to reset list->tail on the last sigpop() | Tavian Barnes | 2024-10-10 | 1 | -0/+7 |
| | | | | | | | This was causing a UAF if we ever unregistered the last hook for a signal and then re-registered one. Fixes: 75b7f70 ("sighook: Make sigunhook() O(1)") | ||||
* | tests/sighook: Use the new xtimer_start() API | Tavian Barnes | 2024-10-10 | 1 | -8/+6 |
| | |||||
* | color: Fix an assertion failure with embedded NUL bytes | Tavian Barnes | 2024-10-02 | 2 | -0/+32 |
| | | | | | | | | | | | | | Leading NUL bytes (e.g. `*\0.gz=...`) could cause us to insert a non-prefix-free set of strings into the case-insensitive extension trie, which would lead to crashes like bfs: trie_split@src/trie.c:538: Assertion failed: `key_nibble != rep_nibble` and OOB accesses to trie leaf keys. Fix it by ignoring those extensions, since filenames cannot contain NUL bytes. Fixes: 08030aea ("color: Delay the case_sensitive decision") | ||||
* | Fix spelling | Tavian Barnes | 2024-09-23 | 2 | -2/+2 |
| | |||||
* | opt: Fix an invalid assertion in sink_not_comma() | Tavian Barnes | 2024-09-17 | 2 | -0/+36 |
| | | | | | | | When optimizing -not \( -a , -b \), the child is a comma expression, not the parent. Fixes: 4a36bb9 ("expr: Make expressions variadic") | ||||
* | Fix includes | Tavian Barnes | 2024-08-29 | 7 | -6/+4 |
| | |||||
* | build: Move feature test macros to prelude.h | Tavian Barnes | 2024-08-28 | 12 | -18/+4 |
| | | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented. | ||||
* | prelude: Split bfs-specific utilities into new bfs.h header | Tavian Barnes | 2024-08-28 | 13 | -7/+34 |
| | |||||
* | diag: Get rid of bfs_static_assert() | Tavian Barnes | 2024-08-28 | 1 | -31/+37 |
| | | | | | In most cases, it's not too annoying to specify a message. For tests/bit.c, we can manually polyfill the 1-argument version. | ||||
* | prelude: Define thread_local | Tavian Barnes | 2024-08-28 | 1 | -1/+0 |
| | |||||
* | eval: Don't warn about suppressed errors without -noerror | Tavian Barnes | 2024-08-19 | 1 | -0/+2 |
| | |||||
* | tests/bfs: Add -noerror tests | Tavian Barnes | 2024-08-19 | 7 | -0/+21 |
| | |||||
* | xtime: Remove xgettime() | Tavian Barnes | 2024-08-09 | 1 | -2/+2 |
| | | | | clock_gettime() is available everywhere by now. | ||||
* | parse: Take umask into account in parse_mode() | Tavian Barnes | 2024-08-02 | 4 | -2/+21 |
| | | | | | | | 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 Barnes | 2024-08-02 | 22 | -103/+333 |
| | |||||
* | tests: Make some more variables local | Tavian Barnes | 2024-08-01 | 1 | -2/+4 |
| | |||||
* | tests: Fix line number reported when wait -n fails | Tavian Barnes | 2024-08-01 | 1 | -2/+3 |
| | |||||
* | tests: Add tests for invalid users/groups | Tavian Barnes | 2024-07-27 | 28 | -0/+8 |
| | |||||
* | tests: Make more tests POSIX-compliant | Tavian Barnes | 2024-07-23 | 10 | -10/+10 |
| | |||||
* | tests/common: Add some missing paths | Tavian Barnes | 2024-07-23 | 4 | -4/+4 |
| | |||||
* | Implement POSIX 2024's -mount | Tavian Barnes | 2024-07-08 | 5 | -6/+2 |
| | | | | | | This reverts commit 4f80c17192f2b28c96a489969d4435151d68d0ce. Link: https://www.austingroupbugs.net/view.php?id=1133 | ||||
* | tests: -print0 is in POSIX 2024 | Tavian Barnes | 2024-07-08 | 2 | -0/+0 |
| | | | | Link: https://www.austingroupbugs.net/view.php?id=243 | ||||
* | tests: -iname is in POSIX 2024 | Tavian Barnes | 2024-07-08 | 3 | -2/+1 |
| | | | | Link: https://www.austingroupbugs.net/view.php?id=1031 | ||||
* | tests: Simplify unit tests with a global variable | Tavian Barnes | 2024-07-07 | 11 | -324/+263 |
| | | | | | It's a little awkward to thread the test result through manually; much easier to just make bfs_check() update a global variable. | ||||
* | sighook: Replace sigtables with RCU-protected linked lists | Tavian Barnes | 2024-07-07 | 1 | -34/+60 |
| | | | | | | | | This fixes an ABA problem where sigdispatch() could think no handlers are registered for a signal even when there are. Link: https://unix.stackexchange.com/a/779594/56202 Fixes: 375caac ("sighook: New utilities for hooking signals") | ||||
* | tests/bfs: New case-sensitivity ordering test | Tavian Barnes | 2024-07-03 | 2 | -0/+28 |
| | |||||
* | color: Delay the case_sensitive decision | Tavian Barnes | 2024-07-02 | 2 | -0/+28 |
| | |||||
* | xspawn: Check X_OK even without $PATH resolution | Tavian Barnes | 2024-06-08 | 1 | -0/+2 |
| | | | | | | | | | | Not all posix_spawn() implementations use errno to report execv() failures from the child process, as that requires either a kernel posix_spawn() implementation or a pipe to pass the error back. This should fix tests/posix/exec_nonexistent on OpenBSD and HPPA. Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hppa&ver=3.3.1-1&stamp=1717489148&raw=0 | ||||
* | tests: Do chmod +rwX in clean_stddirs() | Tavian Barnes | 2024-06-08 | 1 | -0/+1 |
| | |||||
* | build: Add -Wmissing-variable-declarations | Tavian Barnes | 2024-06-08 | 1 | -2/+2 |
| | |||||
* | tests: Improve color case insensitivity coverage | Tavian Barnes | 2024-06-05 | 2 | -6/+6 |
| | |||||
* | tests: New inaccessible/ directory tree for permission errors | Tavian Barnes | 2024-06-04 | 9 | -38/+18 |
| | |||||
* | tests: Add directories with different permissions to perms/ | Tavian Barnes | 2024-06-04 | 20 | -80/+103 |
| | |||||
* | tests/common: Add tests for -[am]{min,time} | Tavian Barnes | 2024-06-04 | 8 | -0/+84 |
| | |||||
* | xtime: Add support for @epochseconds timestamps | Tavian Barnes | 2024-06-04 | 2 | -25/+12 |
| | |||||
* | Merge branch 'revert-eloop' | Tavian Barnes | 2024-06-03 | 4 | -2/+4 |
|\ |