diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-11-09 11:14:12 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-11-09 12:08:20 -0500 |
commit | b41dca52762c5188638236ae81b9f4597bb29ac9 (patch) | |
tree | 4d503f6dcee1b1ed15ef61df3c8ccb9b92533546 /tests/posix | |
parent | dd6808539013061a3113e45c7267430e56749f2c (diff) | |
download | bfs-b41dca52762c5188638236ae81b9f4597bb29ac9.tar.xz |
pwcache: Fill the user/group caches lazily
Iterating all the users/groups can be expensive, especially with NSS.
Android has so many that it doesn't even return them all from
get{pw,gr}ent() for performance reasons, leading to incorrect behaviour
of -user/-group/etc.
Diffstat (limited to 'tests/posix')
-rw-r--r-- | tests/posix/nogroup_ulimit.sh | 7 | ||||
-rw-r--r-- | tests/posix/nouser_ulimit.sh | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/posix/nogroup_ulimit.sh b/tests/posix/nogroup_ulimit.sh index e7231d9..8f758c4 100644 --- a/tests/posix/nogroup_ulimit.sh +++ b/tests/posix/nogroup_ulimit.sh @@ -1,3 +1,8 @@ closefrom 4 ulimit -n 16 -bfs_diff deep -nogroup + +# -mindepth 18, but POSIX +path="*/*/*/*/*/*" +path="$path/$path/$path" +bfs_diff deep -path "deep/$path" -nogroup + diff --git a/tests/posix/nouser_ulimit.sh b/tests/posix/nouser_ulimit.sh index 1d0dd65..2777589 100644 --- a/tests/posix/nouser_ulimit.sh +++ b/tests/posix/nouser_ulimit.sh @@ -1,3 +1,7 @@ closefrom 4 ulimit -n 16 -bfs_diff deep -nouser + +# -mindepth 18, but POSIX +path="*/*/*/*/*/*" +path="$path/$path/$path" +bfs_diff deep -path "deep/$path" -nouser |