summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: -iname is in POSIX 2024Tavian Barnes2024-07-083-2/+1
| | | | Link: https://www.austingroupbugs.net/view.php?id=1031
* tests: Simplify unit tests with a global variableTavian Barnes2024-07-0711-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 listsTavian Barnes2024-07-071-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 testTavian Barnes2024-07-032-0/+28
|
* color: Delay the case_sensitive decisionTavian Barnes2024-07-022-0/+28
|
* xspawn: Check X_OK even without $PATH resolutionTavian Barnes2024-06-081-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 Barnes2024-06-081-0/+1
|
* build: Add -Wmissing-variable-declarationsTavian Barnes2024-06-081-2/+2
|
* tests: Improve color case insensitivity coverageTavian Barnes2024-06-052-6/+6
|
* tests: New inaccessible/ directory tree for permission errorsTavian Barnes2024-06-049-38/+18
|
* tests: Add directories with different permissions to perms/Tavian Barnes2024-06-0420-80/+103
|
* tests/common: Add tests for -[am]{min,time}Tavian Barnes2024-06-048-0/+84
|
* xtime: Add support for @epochseconds timestampsTavian Barnes2024-06-042-25/+12
|
* Merge branch 'revert-eloop'Tavian Barnes2024-06-034-2/+4
|\
| * Make ELOOP an error again, except for -xtype.3.3.1Tavian Barnes2024-06-034-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
* | parse: Allow -Darg/-Sarg as well as -D arg / -S argTavian Barnes2024-06-036-0/+59
| |
* | parse: Handle multiple flags at once like -LEXO2Tavian Barnes2024-06-0311-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The POSIX Utility Syntax Guidelines specify that flag groups like -HL should be handled like -H -L. GNU find doesn't support grouping flags in this way, but BSD find does. To avoid conflicts with non-flag primaries, for now we require at least one flag in a group to be a capital letter. That is, we support things like -Lds but not -ds. We also do not support -fPATH (without a space) as it would conflict with -follow, -fprint, etc. It is impossible to be compatible with both GNU and BSD find here: user@gnu$ find -follow link link/file ... user@bsd$ find -follow find: ollow: No such file or directory Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
* | list: New SLIST_SPLICE() macroTavian Barnes2024-05-313-0/+101
| |
* | bit: Update to match C23Tavian Barnes2024-05-291-18/+18
|/ | | | | | | | | | Based on the latest C23 draft (N3220): - Argument types to generic bit functions should be unsigned - Bit functions return unsigned int - Byte-swapping functions (stdc_memreverse8*()) weren't added - stdc_rotate_{left,right}() weren't added - first_leading_*() counts from the *left*
* Implement the remaining regex typesTavian Barnes2024-05-2812-0/+27
| | | | Closes: https://github.com/tavianator/bfs/issues/21
* tests: Add some more weird namesTavian Barnes2024-05-289-0/+67
|
* xregex: Support non-capturing groups with -regextype emacsTavian Barnes2024-05-271-1/+1
| | | | | Link: https://savannah.gnu.org/bugs/index.php?65770 Link: https://github.com/kkos/oniguruma/issues/296
* bfstd: Treat ELOOP like ENOENTTavian Barnes2024-05-274-1/+23
| | | | | | | 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
* tests/posix: Add a test for -prune with EACCESSTavian Barnes2024-05-272-0/+9
| | | | Link: https://savannah.gnu.org/bugs/?60207
* tests: Make diff listen to $NO_COLORTavian Barnes2024-05-241-2/+2
|
* tests: Make hide_bar actually hide the barTavian Barnes2024-05-222-1/+15
|
* tests: Print progress outside the scroll regionTavian Barnes2024-05-223-44/+132
|
* tests: Restart wait when interrupted by a signalTavian Barnes2024-05-221-6/+15
|
* Stop using %mTavian Barnes2024-05-201-1/+2
|
* printf: The ' ' (space) flag must be numericTavian Barnes2024-05-192-1/+2
|
* Cast AT_FDCWD to int for comparisonsTavian Barnes2024-05-171-1/+1
| | | | | Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets typed as an unsigned int.
* diag: New helpers to include xstrerror(errno) automaticallyTavian Barnes2024-05-177-50/+42
|
* sighook: New utilities for hooking signalsTavian Barnes2024-05-163-0/+101
| | | | This allows multiple hooks to be installed for a single signal.
* xtime: Use the libc's timegm() if presentTavian Barnes2024-05-061-4/+8
|
* build: Replace `make config` with a `./configure` scriptTavian Barnes2024-04-292-18/+6
| | | | | | | | | | This lets us do more traditional out-of-tree builds like $ ../path/to/bfs/configure $ make The .mk files are moved from ./config to ./build, mostly so that ./configure will auto-complete easily.
* eval: Plug memory leak if bfs_opendir() failsTavian Barnes2024-04-246-0/+10
|
* config: Check for struct stat::st_{a,c,m,birth}{tim,timespec}Tavian Barnes2024-04-191-2/+2
|
* Rename config.h to prelude.hTavian Barnes2024-04-1910-10/+10
|
* tests: Add ../src to the include pathTavian Barnes2024-04-1911-36/+36
|
* tests: Quiet diffTavian Barnes2024-04-161-2/+2
| | | | | | On Solaris/Illumos, `diff` prints "No differences encountered" if the files are the same. Guard it with `cmp -s` so we get no output for passing tests.
* tests: Move newer_link out of posix/Tavian Barnes2024-04-094-0/+5
| | | | | | | | 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
* build: Add a separate configuration stepTavian Barnes2024-04-092-3/+9
|
* tests/bsd: Add a -sparse testTavian Barnes2024-03-282-0/+13
|
* tests/gnu: Add a -used testTavian Barnes2024-03-282-0/+44
|
* tests/common: Add a -delete error handling testTavian Barnes2024-03-282-0/+17
|
* xspawn: Fix bfs_resolve_late() error reportingTavian Barnes2024-03-271-0/+23
|
* tests/xspawn: Test path resolution failureTavian Barnes2024-03-271-3/+30
|
* tests/xspawn: Also test dup2()Tavian Barnes2024-03-271-1/+3
|
* tests/xspawn: New unit testTavian Barnes2024-03-274-0/+175
|
* tests: New bfs_pcheck() macro to report xstrerror(errno)Tavian Barnes2024-03-273-3/+25
|