Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | tests: Make hide_bar actually hide the bar | Tavian Barnes | 2024-05-22 | 2 | -1/+15 |
| | |||||
* | tests: Print progress outside the scroll region | Tavian Barnes | 2024-05-22 | 3 | -44/+132 |
| | |||||
* | tests: Restart wait when interrupted by a signal | Tavian Barnes | 2024-05-22 | 1 | -6/+15 |
| | |||||
* | Stop using %m | Tavian Barnes | 2024-05-20 | 1 | -1/+2 |
| | |||||
* | printf: The ' ' (space) flag must be numeric | Tavian Barnes | 2024-05-19 | 2 | -1/+2 |
| | |||||
* | Cast AT_FDCWD to int for comparisons | Tavian Barnes | 2024-05-17 | 1 | -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) automatically | Tavian Barnes | 2024-05-17 | 7 | -50/+42 |
| | |||||
* | sighook: New utilities for hooking signals | Tavian Barnes | 2024-05-16 | 3 | -0/+101 |
| | | | | This allows multiple hooks to be installed for a single signal. | ||||
* | xtime: Use the libc's timegm() if present | Tavian Barnes | 2024-05-06 | 1 | -4/+8 |
| | |||||
* | build: Replace `make config` with a `./configure` script | Tavian Barnes | 2024-04-29 | 2 | -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() fails | Tavian Barnes | 2024-04-24 | 6 | -0/+10 |
| | |||||
* | config: Check for struct stat::st_{a,c,m,birth}{tim,timespec} | Tavian Barnes | 2024-04-19 | 1 | -2/+2 |
| | |||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 10 | -10/+10 |
| | |||||
* | tests: Add ../src to the include path | Tavian Barnes | 2024-04-19 | 11 | -36/+36 |
| | |||||
* | tests: Quiet diff | Tavian Barnes | 2024-04-16 | 1 | -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 Barnes | 2024-04-09 | 4 | -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 step | Tavian Barnes | 2024-04-09 | 2 | -3/+9 |
| | |||||
* | tests/bsd: Add a -sparse test | Tavian Barnes | 2024-03-28 | 2 | -0/+13 |
| | |||||
* | tests/gnu: Add a -used test | Tavian Barnes | 2024-03-28 | 2 | -0/+44 |
| | |||||
* | tests/common: Add a -delete error handling test | Tavian Barnes | 2024-03-28 | 2 | -0/+17 |
| | |||||
* | xspawn: Fix bfs_resolve_late() error reporting | Tavian Barnes | 2024-03-27 | 1 | -0/+23 |
| | |||||
* | tests/xspawn: Test path resolution failure | Tavian Barnes | 2024-03-27 | 1 | -3/+30 |
| | |||||
* | tests/xspawn: Also test dup2() | Tavian Barnes | 2024-03-27 | 1 | -1/+3 |
| | |||||
* | tests/xspawn: New unit test | Tavian Barnes | 2024-03-27 | 4 | -0/+175 |
| | |||||
* | tests: New bfs_pcheck() macro to report xstrerror(errno) | Tavian Barnes | 2024-03-27 | 3 | -3/+25 |
| | |||||
* | bfstd: Escape ASCII tildes | Tavian Barnes | 2024-03-26 | 1 | -0/+2 |
| | | | | | | | | The POSIX spec [1] lists some characters that may need to be escaped. Unfortunately, the document uses ˜ (U+02DC SMALL TILDE) instead of ~ (U+007E TILDE), and I copy-pasted from it. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02 | ||||
* | xtime: Don't update tm if xtimegm() overflows | Tavian Barnes | 2024-03-26 | 1 | -12/+22 |
| | |||||
* | bfstd: New asciilen() function | Tavian Barnes | 2024-03-21 | 1 | -0/+15 |
| | |||||
* | bit: Check __BYTE_ORDER__ for the native endian | Tavian Barnes | 2024-03-21 | 1 | -0/+13 |
| | | | | __ORDER_NATIVE_ENDIAN__ is not a thing. | ||||
* | bfstd: Check that wcwidth() is positive | Tavian Barnes | 2024-03-20 | 1 | -0/+3 |
| | | | | | wcwidth() returns -1 for non-printable characters, but terminals typically don't print anything for them, so treat them as 0. | ||||
* | Implement -limit N | Tavian Barnes | 2024-03-20 | 6 | -0/+9 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/133 | ||||
* | Re-run include-what-you-use | Tavian Barnes | 2024-03-11 | 7 | -9/+7 |
| | |||||
* | tests/xtime: Add tests for integer overflow | Tavian Barnes | 2024-03-10 | 1 | -0/+28 |
| | |||||
* | xtime: Call tzset() from main() instead of lazily | Tavian Barnes | 2024-03-07 | 4 | -13/+18 |
| | | | | | | | | | | | | | POSIX specifies[1] that If a thread accesses tzname, daylight, or timezone directly while another thread is in a call to tzset(), or to any function that is required or allowed to set timezone information as if by calling tzset(), the behavior is undefined. So calling it lazily from arbitrary threads is risky. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/tzset.html | ||||
* | tests: Change the timezone for -daystart tests | Tavian Barnes | 2024-03-07 | 2 | -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/ioq: Check that we push and pop the same number of times | Tavian Barnes | 2024-03-02 | 1 | -3/+5 |
| | |||||
* | tests: New bfs_check() macro | Tavian Barnes | 2024-02-29 | 6 | -234/+247 |
| | | | | | We now report failures and continue, rather than aborting after the first failure. | ||||
* | tests: Add more datetime parsing integration tests | Tavian Barnes | 2024-02-29 | 2 | -4/+6 |
| | |||||
* | xtime: Fix some xgetdate() bugs | Tavian Barnes | 2024-02-28 | 1 | -9/+93 |
| | | | | And add some more test cases. | ||||
* | tests/ioq: New unit test | Tavian Barnes | 2024-02-28 | 3 | -0/+77 |
| | |||||
* | tests/bfs/D_opt: Don't rely on directory link counts | Tavian Barnes | 2024-02-28 | 2 | -12/+1 |
| | | | | Fixes: https://github.com/tavianator/bfs/issues/131 | ||||
* | tests: Redirect stdin in bfs_pty() | Tavian Barnes | 2024-02-17 | 1 | -1/+1 |
| | | | | Otherwise bfs will think it's interactive. | ||||
* | bftw: stat() files asynchronously | Tavian Barnes | 2024-02-06 | 1 | -1/+1 |
| | |||||
* | tests: Fix --stop | Tavian Barnes | 2024-02-05 | 1 | -1/+1 |
| | |||||
* | tests: Implement jobserver inheritance | Tavian Barnes | 2024-02-03 | 4 | -35/+125 |
| | |||||
* | tests: Don't clobber inherited FDs | Tavian Barnes | 2024-02-01 | 11 | -52/+45 |
| | | | | | Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them. | ||||
* | tests: Use variable redirections to dup std{out,err} | Tavian Barnes | 2024-02-01 | 2 | -28/+15 |
| | | | | | | | | | | | Previously, we hardcoded file descriptors 3 and 4 for duplicating stdandard output/error respectively. In preparation for keeping inherited FDs open, switch to using bash's variable redirection feature to dynamically assign FDs. This feature is only available from bash 4.1 onwards, so this marks the end of our support for bash 3. macOS users will need to install a modern bash version to run our tests. | ||||
* | bftw: Actually stop if the callback returns BFTW_STOP | Tavian Barnes | 2024-01-31 | 2 | -0/+5 |
| | | | | | | Otherwise, bftw_ids() or bftw_eds() might keep going! Fixes: 5f16169 ("bftw: Share the bftw_state between iterations of ids/eds") | ||||
* | tests/posix: Avoid catastrophic backtracking | Tavian Barnes | 2024-01-17 | 2 | -11/+2 |
| | | | | | | Using -path 'deep/*/*/.../*' to simulate -mindepth 18 falls off a performance cliff on systems that use backtracking for fnmatch(). This was observed on macOS 12.4. Instead, just use -type f. | ||||
* | tests: Properly filter escape sequences with --verbose=tests | Tavian Barnes | 2024-01-13 | 1 | -1/+1 |
| |