Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | tests/gnu: Add an -ignore_readdir_race test for removed directories | Tavian Barnes | 6 days | 2 | -0/+7 |
| | | | | Link: https://savannah.gnu.org/bugs/index.php?45930 | ||||
* | tests/gnu: Test -L -printf %Y | Tavian Barnes | 2024-10-10 | 2 | -0/+18 |
| | |||||
* | 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") | ||||
* | tests/bfs: Add -noerror tests | Tavian Barnes | 2024-08-19 | 1 | -0/+0 |
| | |||||
* | tests: Add more files to perms/ | Tavian Barnes | 2024-08-02 | 8 | -54/+177 |
| | |||||
* | tests: Add tests for invalid users/groups | Tavian Barnes | 2024-07-27 | 20 | -204/+0 |
| | |||||
* | tests: -print0 is in POSIX 2024 | Tavian Barnes | 2024-07-08 | 2 | -2/+0 |
| | | | | Link: https://www.austingroupbugs.net/view.php?id=243 | ||||
* | tests: Add directories with different permissions to perms/ | Tavian Barnes | 2024-06-04 | 8 | -40/+54 |
| | |||||
* | xtime: Add support for @epochseconds timestamps | Tavian Barnes | 2024-06-04 | 1 | -25/+6 |
| | |||||
* | Make ELOOP an error again, except for -xtype.3.3.1 | Tavian Barnes | 2024-06-03 | 4 | -2/+4 |
| | | | | | | | | | | POSIX requires an error if (for example) -L encounters a symlink loop. The GNU find change was restricted to -xtype, so add a manual ELOOP test to eval_xtype() for compatibility. This reverts commit 470589cbd9ca3e73d8c01ac3a96cbc065179dcc5. Link: https://savannah.gnu.org/bugs/?19605 | ||||
* | Implement the remaining regex types | Tavian Barnes | 2024-05-28 | 12 | -0/+27 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/21 | ||||
* | tests: Add some more weird names | Tavian Barnes | 2024-05-28 | 3 | -0/+32 |
| | |||||
* | xregex: Support non-capturing groups with -regextype emacs | Tavian Barnes | 2024-05-27 | 1 | -1/+1 |
| | | | | | Link: https://savannah.gnu.org/bugs/index.php?65770 Link: https://github.com/kkos/oniguruma/issues/296 | ||||
* | bfstd: Treat ELOOP like ENOENT | Tavian Barnes | 2024-05-27 | 3 | -0/+15 |
| | | | | | | | GNU findutils just made the same change, so looping symlinks will be considered broken rather than a hard error. Link: https://savannah.gnu.org/bugs/?51926 | ||||
* | printf: The ' ' (space) flag must be numeric | Tavian Barnes | 2024-05-19 | 1 | -1/+1 |
| | |||||
* | eval: Plug memory leak if bfs_opendir() fails | Tavian Barnes | 2024-04-24 | 4 | -30/+0 |
| | |||||
* | tests: Move newer_link out of posix/ | Tavian Barnes | 2024-04-09 | 2 | -0/+2 |
| | | | | | | | | 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/gnu: Add a -used test | Tavian Barnes | 2024-03-28 | 2 | -0/+44 |
| | |||||
* | tests: Change the timezone for -daystart tests | Tavian Barnes | 2024-03-07 | 2 | -2/+2 |
| | | | | | | | Otherwise, if the test files are created just before midnight, and the test runs just after midnight, -daystart will consider them one day old. Fixes #132 | ||||
* | tests: Don't clobber inherited FDs | Tavian Barnes | 2024-02-01 | 3 | -18/+18 |
| | | | | | Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them. | ||||
* | tests: Fix a possible infinite loop | Tavian Barnes | 2023-11-15 | 1 | -2/+4 |
| | | | | | | | | | | | | | | | | | | | The POSIX spec for readdir() [1] says: > If a file is removed from or added to the directory after the most > recent call to opendir() or rewinddir(), whether a subsequent call > to readdir() returns an entry for that file is unspecified. which implies that a loop of readdir()/unlink()/creat() may continue to return new files unendingly. This was even observed on a Linux 6.6 tmpfs mount [2]. It's not clear whether find(1) is also permitted to loop endlessly in this case, but in case it is, let's avoid the whole problem by limiting the -exec to happen at most once. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html [2]: https://lore.kernel.org/linux-fsdevel/20231113180616.2831430-1-tavianator@tavianator.com/ | ||||
* | parse: Reject -{exec,ok}dir if $PATH contains a relative path | Tavian Barnes | 2023-11-07 | 6 | -0/+6 |
| | | | | This matches the behaviour of GNU find. | ||||
* | tests: Add tests for ulimit -n after -exec | Tavian Barnes | 2023-11-02 | 2 | -0/+18 |
| | |||||
* | tests: Use test-specific scratch directories | Tavian Barnes | 2023-10-22 | 22 | -74/+72 |
| | |||||
* | tests: Refactor implementation into separate files | Tavian Barnes | 2023-10-19 | 1 | -1/+0 |
| | |||||
* | tests: New defer function | Tavian Barnes | 2023-10-19 | 5 | -6/+6 |
| | |||||
* | tests: Add missing .out file | Tavian Barnes | 2023-08-14 | 1 | -0/+0 |
| | |||||
* | parse: Allow -files0-from an empty set of paths | Tavian Barnes | 2023-08-14 | 1 | -1/+1 |
| | | | | This follows a behaviour change in GNU findutils 4.9.0. | ||||
* | color: TTY-escape filenames | Tavian Barnes | 2023-07-13 | 1 | -0/+1 |
| | |||||
* | tests/bfs/color: Add mixed-case extensions | Tavian Barnes | 2023-06-29 | 1 | -3/+8 |
| | |||||
* | tests/gnu/printf_times: Correct %T@ to %A@ | Tavian Barnes | 2023-06-22 | 1 | -1/+1 |
| | |||||
* | mtab: Mitigate the race between bfs_mtab_parse() and bfs_mtab_fill_types() | Tavian Barnes | 2023-01-22 | 2 | -0/+12 |
| | | | | Fixes #97. | ||||
* | tests: Use bfs_sudo wrapper instead of testing $SUDO | Tavian Barnes | 2022-12-29 | 3 | -11/+8 |
| | |||||
* | tests: New test for -fstype on a stacked mount point | Tavian Barnes | 2022-12-16 | 2 | -0/+14 |
| | |||||
* | tests: Fail early in bfs_diff if the diff fails | Tavian Barnes | 2022-12-16 | 2 | -2/+2 |
| | | | | Otherwise, propagate the exit code from bfs | ||||
* | tests: Turn on set -e | Tavian Barnes | 2022-12-16 | 5 | -20/+11 |
| | |||||
* | tests: Move crash detection into invoke_bfs, use ! instead of fail | Tavian Barnes | 2022-12-16 | 21 | -21/+21 |
| | |||||
* | tests: Replace skip_unless test with test || skip | Tavian Barnes | 2022-12-16 | 16 | -22/+21 |
| | |||||
* | Revert "exec: Don't flush if the user says no to -ok" | Tavian Barnes | 2022-11-10 | 3 | -1/+24 |
| | | | | | | | | | | | From the bfs_ctx_flush() implementation: // Before executing anything, flush all open streams. This ensures that // - the user sees everything relevant before an -ok[dir] prompt But that only works if we call it before the prompt. This reverts commit 21344dfb72f9b65b366ca5f754f1bc35f52da3c7. | ||||
* | tests/xtouch: New utility | Tavian Barnes | 2022-11-07 | 4 | -5/+5 |
| | | | | | | 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: Skip fstype tests if the mtab isn't available | Tavian Barnes | 2022-11-06 | 1 | -0/+1 |
| | |||||
* | tests/gnu/inum_automount: Work around systemd-mount race | Tavian Barnes | 2022-10-21 | 2 | -6/+6 |
| | | | | | | | | | | | | This test used systemd-mount to set up an automount on scratch/mnt. If a previous test mounted something there, systemd will notice that asynchronously and may not have noticed the unmount by the time that test runs. This led to the test randomly being skipped sometimes when systemd-mount failed. It could be reproduced with a loop like this: $ for _ in {1..10}; ./tests/tests.sh common/L_mount gnu/inum_automount Work around it by using scratch/automnt instead to avoid conflicts. | ||||
* | tests: Always clean scratch before using it | Tavian Barnes | 2022-10-20 | 2 | -0/+2 |
| | |||||
* | tests: Add a helper for cleaning scratch | Tavian Barnes | 2022-10-20 | 7 | -8/+8 |
| | | | | And try to unmount things if the a test left them mounted. | ||||
* | tests: Coverage number go up | Tavian Barnes | 2022-10-19 | 6 | -0/+24 |
| | |||||
* | tests: Split test cases into separate files | Tavian Barnes | 2022-10-19 | 188 | -0/+1113 |