| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This was only added in Bash 4.3 which is too new for macOS.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX actually says
> If the utility would be executed with file descriptor 0, 1, or 2
> closed, implementations may execute the utility with the file
> descriptor open to an unspecified file.
So we're not guaranteed to be able to detect the situation in the first
place. Add a best-effort check for these platforms and skip the test.
Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, some tests that try to check for flag support like
invoke_bfs scratch -quit -xattr || skip
can be accidentally skipped if ./scratch doesn't exist yet:
$ ./tests/tests.sh bsd/xattr
tests skipped: 1
After this patch, we get the expected
$ ./tests/tests.sh bsd/xattr
tests passed: 1
|
| |
|