summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
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.
2022-10-19tests: Coverage number go upTavian Barnes
2022-10-19tests: Split test cases into separate filesTavian Barnes
2022-10-05tests: Test -exec with a nonexistent commandTavian Barnes
2022-09-18tests: POSIX doesn't *require* -ok ... {} + to be unsupportedTavian Barnes
2022-07-18tests: Don't pass NUL bytes to sortTavian Barnes
The tests now pass with busybox instead of coreutils.
2022-07-13tests: Limit path lengths passed to mkdirTavian Barnes
FreeBSD limits mkdir() to 1023 bytes, not 4096.
2022-07-13tests: Set colors to the empty string for non-ttysTavian Barnes
2022-07-13tests: Use set -uTavian Barnes
2022-07-13tests: Optimize startupTavian Barnes
./tests.sh is about 110ms faster on my machine with this patch.
2022-07-13tests: Add tests for parsing failures in more locationsTavian Barnes
2022-07-12tests: New test for -exec with unset $PATHTavian Barnes
2022-07-12tests: Simplify snapshot testing without bfs_diffTavian Barnes
2022-06-01tests: Add a test for every printf directiveTavian Barnes
2022-05-29tests: Add tests for -warn/-nowarnTavian Barnes
2022-05-20tests: Don't print test names to non-ttys without --verbose=testsTavian Barnes
This should shrink the CI logs appreciably.