| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
This catches new data flow inferences that can be made after swapping
the children of an expression.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Same bug as https://savannah.gnu.org/bugs/?46305. Please don't ever do
this though.
|
| |
|
|
|
|
|
|
|
| |
This avoids the potential for "broken pipe" errors observed on some
systems, e.g.
http://build.alpinelinux.org/buildlogs/build-edge-s390x/testing/bfs/bfs-1.2.2-r0.log
|
|
|
|
|
| |
Whether bfs can return children of a directory without search permission
depends on whether d_type is filled in, which can't be guaranteed.
|
| |
|
|
|
|
|
|
|
| |
BusyBox rm, for example, doesn't handle long paths properly, so give it
some help.
C.f. http://lists.busybox.net/pipermail/busybox/2018-March/086302.html
|
|
|
|
|
| |
This frees up an extra FD for some diff implementations like openbox
that need it when ulimit -n is low.
|
| |
|
|
|
|
| |
Useful for debugging testsuite failures.
|
|
|
|
|
| |
%w and %W were chosen to match the format specifiers for file birth
times from stat(1)
|
| |
|
| |
|
|
|
|
| |
Fixes #22
|
|
|
|
| |
Otherwise we miss write errors that occur when flushing the cache.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Some platforms will print errors like "cannot access parent directories:
Result too large"
|
|
|
|
| |
On Solaris, /proc/self/fd is dynamic while /dev/fd is static.
|
|
|
|
|
|
| |
Apparently macOS doesn't support ln -P.
This reverts commit 80eec18020f531abbdb2abbb919ab6c6fa34107c.
|
|
|
|
|
|
| |
-empty and -xtype may have side effects like reporting permission
errors, which even affect the exit status of bfs. We shouldn't remove
these effects without -Ofast.
|
| |
|
|
|
|
|
| |
And move test_deep_strict to the bfs-specific tests, since it's not
likely to ever pass for other implementations.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Rather than open-code the fallback logic for broken symlinks everywhere
it's needed, introduce a new xfstatat() utility function that performs
the fallback automatically.
Using xfstatat() consistently fixes a few bugs, including cases where
broken symlinks are given as arguments to predicates like -samefile.
|
| |
|
|
|
|
| |
-ok should look for a ; even if it sees {} +, according to POSIX.
|
| |
|
|
|
|
|
|
|
|
|
| |
POSIX explicitly forbids this extension:
> Only a <plus-sign> that immediately follows an argument containing
> only the two characters "{}" shall punctuate the end of the primary
> expression. Other uses of the <plus-sign> shall not be treated as
> special.
|
| |
|
|
|
|
|
|
|
| |
Just because an expression is always true or false, doesn't mean we can
execute it more often than it otherwise would be, unless it's also pure.
But that's equivalent to being identically -true/-false, so just check
that.
|
|
|
|
| |
Also from NetBSD.
|
| |
|
|
|
|
| |
From NetBSD again.
|
|
|
|
| |
From NetBSD.
|
|
|
|
|
|
| |
This reverts commit 4b02d5dae771a8797868ccaddf1bbb7cf0b67c2b.
Overwriting the last line of the test output is worse.
|
|
|
|
|
| |
This way the cursor is always at the beginning of the line, so any error
output is more readable.
|
| |
|
| |
|
|
|
|
|
|
| |
For a/b/c, ENOTDIR is returned instead of ENOENT if a or b are not
directories. Handle this uniformly when detecting broken symlinks,
readdir races, etc.
|
|
|
|
|
| |
The root has depth == 0, but we still need to include it in the
components array.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is always possible to force a breadth-first traversal to encounter
ENAMETOOLONG, regardless of the dircache eviction policy. As a concrete
example, consider this directory structure:
./1/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... (longer than {PATH_MAX})
./2/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/...
./3/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/...
...
(more than RLIMIT_NOFILE directories under .)
Eventually, the next file to be processed will not have any parents in
the cache, as the cache can only hold RLIMIT_NOFILE entries. Then the
whole path must be traversed from ., which will exceed {PATH_MAX} bytes.
Work around this by performing a component-by-component traversal
manually when we see ENAMETOOLONG. This is required by POSIX:
> The find utility shall be able to descend to arbitrary depths in a file
> hierarchy and shall not fail due to path length limitations (unless a
> path operand specified by the application exceeds {PATH_MAX}
> requirements).
|