summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2023-06-20alloc: New header for memory allocation utilitiesTavian Barnes
2023-06-08color: `fi=0` should not fall back to `no`Tavian Barnes
2023-05-19tests/bfstd: Use bfs_verify() over explicit abort()Tavian Barnes
2023-05-18Switch from assert() to bfs_assert()/bfs_verify()Tavian Barnes
2023-05-18bit: Rename int.h to bit.hTavian Barnes
2023-05-16config: Align after saturating in flex_sizeof()Tavian Barnes
This ensures that it's legal to call aligned_alloc() with the result, which requires a multiple of the alignment.
2023-05-16int: Backport C23's bit utilitiesTavian Barnes
2023-05-16int: Backport C23's endian utilitiesTavian Barnes
2023-05-16int: Backport C23's _WIDTH macrosTavian Barnes
2023-05-11config: Saturate on overflow in flex_sizeof()Tavian Barnes
2023-05-11config: Properly align flex_sizeof()Tavian Barnes
2023-05-11config: Provide <stdalign.h> and <stdbool.h>Tavian Barnes
In anticipation of C23, since those headers won't be necessary any more.
2023-05-10config: s/BFS_COUNTOF/countof/Tavian Barnes
2023-04-12build: Fix tsanTavian Barnes
2023-03-31list: Use macros instead of type-erased listsTavian Barnes
2023-03-29trie: Use list.h for the list of leavesTavian Barnes
2023-01-31tests: Use close() wrappersTavian Barnes
2023-01-25Replace license boilerplate with SPDX tagsTavian Barnes
And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
2023-01-22mtab: Mitigate the race between bfs_mtab_parse() and bfs_mtab_fill_types()Tavian Barnes
Fixes #97.
2023-01-19tests/xtouch: Fix macOS buildTavian Barnes
2023-01-19bfstd: New wrappers for dirname()/basename()Tavian Barnes
2022-12-29tests: Use bfs_sudo wrapper instead of testing $SUDOTavian Barnes
2022-12-16tests/bfs/printf_everything: Simplify double negationTavian Barnes
2022-12-16tests: New test for -fstype on a stacked mount pointTavian Barnes
2022-12-16tests: Save test stderr to separate filesTavian Barnes
2022-12-16tests: Fail early in bfs_diff if the diff failsTavian Barnes
Otherwise, propagate the exit code from bfs
2022-12-16tests: Print the skip reason for --verbose=skippedTavian Barnes
2022-12-16tests: Turn on set -eTavian Barnes
2022-12-16tests: Move crash detection into invoke_bfs, use ! instead of failTavian Barnes
2022-12-16tests: Replace skip_unless test with test || skipTavian Barnes
2022-12-14tests: Fix crash when stderr is redirectedTavian Barnes
bash uses fileno(stderr) to keep track of $COLUMNS. With stderr redirected, $COLUMNS will be unset, leading to $ ./tests/tests.sh 2> >(cat) ./tests/tests.sh: line 635: COLUMNS: unbound variable Fix it by using $(tput cols) if $COLUMNS is unset, which is almost POSIX. Link: https://www.austingroupbugs.net/view.php?id=1053
2022-12-14tests/posix/readdir_error: Fix flakinessTavian Barnes
2022-12-13tests: Add a test for readdir() errorsTavian Barnes
2022-12-07config: New BFS_COUNTOF macroTavian Barnes
2022-12-02tests: Allow wildcard patterns like "posix/*"Tavian Barnes
2022-11-30parse: Fix crash on -xdev -mountTavian Barnes
2022-11-30parse: Pass the right argument when warning about -O9Tavian Barnes
2022-11-20tests: Avoid syslog() using a low fd on macOSTavian Barnes
2022-11-11exec: Fix index overflow parsing -exec +Tavian Barnes
2022-11-10typo: Array bounds are exclusive, not inclusiveTavian Barnes
2022-11-10Revert "exec: Don't flush if the user says no to -ok"Tavian Barnes
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.
2022-11-09pwcache: Fill the user/group caches lazilyTavian Barnes
Iterating all the users/groups can be expensive, especially with NSS. Android has so many that it doesn't even return them all from get{pw,gr}ent() for performance reasons, leading to incorrect behaviour of -user/-group/etc.
2022-11-08tests/xtouch: Add some missing POSIX touch featuresTavian Barnes
2022-11-07tests/xtouch: New utilityTavian Barnes
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).
2022-11-06tests: Skip fstype tests if the mtab isn't availableTavian Barnes
2022-10-29trie: Make leaves into a linked listTavian Barnes
2022-10-21tests: Fix privilege dropping when run as rootTavian Barnes
Fixes: 412102712921e2b051da1d2ae9171d67a2a4bd61
2022-10-21tests/gnu/inum_automount: Work around systemd-mount raceTavian Barnes
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.
2022-10-20tests: Always clean scratch before using itTavian Barnes
2022-10-20tests: Add a helper for cleaning scratchTavian Barnes
And try to unmount things if the a test left them mounted.