summaryrefslogtreecommitdiffstats
path: root/tests/common
Commit message (Collapse)AuthorAgeFilesLines
* tests: Refactor implementation into separate filesTavian Barnes2023-10-191-1/+0
|
* tests: New defer functionTavian Barnes2023-10-194-4/+4
|
* bfstd: Fix an OOB string index in xmbrtowc()Tavian Barnes2023-09-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | This bug could be reproduced with something like $ bfs -samefile $'\xFA\xFA' bfs: error: bfs: dstrnescat@src/dstring.c:252: wordesc() result truncated or worse, with -DNDEBUG, $ bfs -samefile $'.....................\xFA\xFA' bfs: error: bfs -samefile $'.....................\xFA\xFA\x00\x55\x53\x45\x52\x3D\x74\x61\x76\x69\x61\x6E\x61\x74\x6F\x72 bfs: error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bfs: error: No such file or directory. which prints the memory after the end of the string (in this case, the environment variable USER=tavianator). The bug was caused by the line `*i += len`, which was intended to be `*i = len`. But actually, the right behaviour seems to be `*i += 1`. Fixes: 19c96abe0a1ee56cf206fd5e87defb1fd3e0daa5
* tests: Use bfs_sudo wrapper instead of testing $SUDOTavian Barnes2022-12-294-12/+8
|
* tests: Fail early in bfs_diff if the diff failsTavian Barnes2022-12-161-1/+1
| | | | Otherwise, propagate the exit code from bfs
* tests: Turn on set -eTavian Barnes2022-12-165-20/+13
|
* tests: Move crash detection into invoke_bfs, use ! instead of failTavian Barnes2022-12-162-2/+2
|
* tests: Replace skip_unless test with test || skipTavian Barnes2022-12-168-12/+12
|
* tests/xtouch: New utilityTavian Barnes2022-11-075-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: Always clean scratch before using itTavian Barnes2022-10-202-0/+2
|
* tests: Add a helper for cleaning scratchTavian Barnes2022-10-207-7/+7
| | | | And try to unmount things if the a test left them mounted.
* tests: Coverage number go upTavian Barnes2022-10-192-0/+2
|
* tests: Split test cases into separate filesTavian Barnes2022-10-19122-0/+433