summaryrefslogtreecommitdiffstats
path: root/tests/posix/nogroup_ulimit.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-17 13:58:39 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-17 13:58:39 -0500
commit40e195c1bd60737964bb2b8ab25780a02003f8e1 (patch)
treeb079dae8e5dd594c8bcb6269eab224a74bc8595b /tests/posix/nogroup_ulimit.sh
parent6f5c265e84f565fd37ea2ad38d7f588ca08b0f03 (diff)
downloadbfs-40e195c1bd60737964bb2b8ab25780a02003f8e1.tar.xz
tests/posix: Avoid catastrophic backtracking
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.
Diffstat (limited to 'tests/posix/nogroup_ulimit.sh')
-rw-r--r--tests/posix/nogroup_ulimit.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/posix/nogroup_ulimit.sh b/tests/posix/nogroup_ulimit.sh
index 2186321..5b4c440 100644
--- a/tests/posix/nogroup_ulimit.sh
+++ b/tests/posix/nogroup_ulimit.sh
@@ -1,7 +1,2 @@
ulimit -n 16
-
-# -mindepth 18, but POSIX
-path="*/*/*/*/*/*"
-path="$path/$path/$path"
-bfs_diff deep -path "deep/$path" -nogroup
-
+bfs_diff deep -type f -nogroup