summaryrefslogtreecommitdiffstats
path: root/tests/gnu
Commit message (Collapse)AuthorAgeFilesLines
* eval: Plug memory leak if bfs_opendir() failsTavian Barnes2024-04-244-30/+0
|
* tests: Move newer_link out of posix/Tavian Barnes2024-04-092-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 testTavian Barnes2024-03-282-0/+44
|
* tests: Change the timezone for -daystart testsTavian Barnes2024-03-072-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 FDsTavian Barnes2024-02-013-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 loopTavian Barnes2023-11-151-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 pathTavian Barnes2023-11-076-0/+6
| | | | This matches the behaviour of GNU find.
* tests: Add tests for ulimit -n after -execTavian Barnes2023-11-022-0/+18
|
* tests: Use test-specific scratch directoriesTavian Barnes2023-10-2222-74/+72
|
* tests: Refactor implementation into separate filesTavian Barnes2023-10-191-1/+0
|
* tests: New defer functionTavian Barnes2023-10-195-6/+6
|
* tests: Add missing .out fileTavian Barnes2023-08-141-0/+0
|
* parse: Allow -files0-from an empty set of pathsTavian Barnes2023-08-141-1/+1
| | | | This follows a behaviour change in GNU findutils 4.9.0.
* color: TTY-escape filenamesTavian Barnes2023-07-131-0/+1
|
* tests/bfs/color: Add mixed-case extensionsTavian Barnes2023-06-291-3/+8
|
* tests/gnu/printf_times: Correct %T@ to %A@Tavian Barnes2023-06-221-1/+1
|
* mtab: Mitigate the race between bfs_mtab_parse() and bfs_mtab_fill_types()Tavian Barnes2023-01-222-0/+12
| | | | Fixes #97.
* tests: Use bfs_sudo wrapper instead of testing $SUDOTavian Barnes2022-12-293-11/+8
|
* tests: New test for -fstype on a stacked mount pointTavian Barnes2022-12-162-0/+14
|
* tests: Fail early in bfs_diff if the diff failsTavian Barnes2022-12-162-2/+2
| | | | Otherwise, propagate the exit code from bfs
* tests: Turn on set -eTavian Barnes2022-12-165-20/+11
|
* tests: Move crash detection into invoke_bfs, use ! instead of failTavian Barnes2022-12-1621-21/+21
|
* tests: Replace skip_unless test with test || skipTavian Barnes2022-12-1616-22/+21
|
* Revert "exec: Don't flush if the user says no to -ok"Tavian Barnes2022-11-103-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 utilityTavian Barnes2022-11-074-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 availableTavian Barnes2022-11-061-0/+1
|
* tests/gnu/inum_automount: Work around systemd-mount raceTavian Barnes2022-10-212-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 itTavian Barnes2022-10-202-0/+2
|
* tests: Add a helper for cleaning scratchTavian Barnes2022-10-207-8/+8
| | | | And try to unmount things if the a test left them mounted.
* tests: Coverage number go upTavian Barnes2022-10-196-0/+24
|
* tests: Split test cases into separate filesTavian Barnes2022-10-19188-0/+1113