| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
__ORDER_NATIVE_ENDIAN__ is not a thing.
|
|
|
|
|
| |
wcwidth() returns -1 for non-printable characters, but terminals
typically don't print anything for them, so treat them as 0.
|
|
|
|
| |
Closes: https://github.com/tavianator/bfs/issues/133
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
We now report failures and continue, rather than aborting after the
first failure.
|
| |
|
|
|
|
| |
And add some more test cases.
|
| |
|
|
|
|
| |
Fixes: https://github.com/tavianator/bfs/issues/131
|
|
|
|
| |
Otherwise bfs will think it's interactive.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Rather than attempting to close any unexpected FDs, just count them and
adjust our ulimit -n calls to account for them.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Otherwise, bftw_ids() or bftw_eds() might keep going!
Fixes: 5f16169 ("bftw: Share the bftw_state between iterations of ids/eds")
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
We used to have is_nonexistence_error() to consistently treat ENOENT and
ENOTDIR the same. Recently, we started considering EFAULT the same as
ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both
of these behind a more generic interface.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX says
> When using the symbolic mode form on a regular file, it is
> implementation-defined whether or not:
>
> - Requests to set the set-user-ID-on-execution or set-group-ID-on-
> execution bit when all execute bits are currently clear and none
> are being set are ignored.
And indeed, illumos ignores them with a warning:
chmod: WARNING: /tmp/bfs.XXXX7KaGWb/rainbow/suid: Execute permission
required for set-ID on execution
Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html
|
| |
|
|
|
|
|
|
|
|
|
| |
DragonFly's x86_64 assembly implementation of copyinstr() checks the
wrong pointer when deciding whether to return EFAULT or ENAMETOOLONG,
causing it to always return EFAULT for overlong paths. Work around it
by treating EFAULT the same as ENAMETOOLONG on DragonFly.
Link: https://twitter.com/tavianator/status/1742991411203485713
|
| |
|
| |
|
| |
|
| |
|
| |
|