| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The POSIX spec for readdir() [1] says:
> If a file is removed from or added to the directory after the most
> recent call to opendir() or rewinddir(), whether a subsequent call
> to readdir() returns an entry for that file is unspecified.
which implies that a loop of readdir()/unlink()/creat() may continue to
return new files unendingly. This was even observed on a Linux 6.6
tmpfs mount [2].
It's not clear whether find(1) is also permitted to loop endlessly in
this case, but in case it is, let's avoid the whole problem by limiting
the -exec to happen at most once.
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
[2]: https://lore.kernel.org/linux-fsdevel/20231113180616.2831430-1-tavianator@tavianator.com/
|
| |
|
|
|
|
|
|
| |
Doesn't work for the highest bit due to overflow.
This reverts commit 208376ef99da243545efcd6fb02d3469b4c068ed.
|
| |
|
| |
|
|
|
|
| |
This matches the behaviour of GNU find.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The docs say
> Command-line software which adds ANSI color to its output by default
> should check for a NO_COLOR environment variable that, when present
> and not an empty string (regardless of its value), prevents the
> addition of ANSI color.
but we were not checking for the empty string.
Link: https://no-color.org/
Link: https://github.com/sharkdp/fd/pull/1421
|
| |
|
| |
|
|
|
|
| |
! false doesn't trigger an error with set -e.
|
|
|
|
|
| |
Invoking bfs in the top directory can lead it to explore other tests'
scratch directories, so explicitly exclude them.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|