From 40e195c1bd60737964bb2b8ab25780a02003f8e1 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 17 Jan 2024 13:58:39 -0500 Subject: 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. --- tests/posix/nouser_ulimit.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/posix/nouser_ulimit.sh') diff --git a/tests/posix/nouser_ulimit.sh b/tests/posix/nouser_ulimit.sh index be0a65f..e1400f0 100644 --- a/tests/posix/nouser_ulimit.sh +++ b/tests/posix/nouser_ulimit.sh @@ -1,6 +1,2 @@ ulimit -n 16 - -# -mindepth 18, but POSIX -path="*/*/*/*/*/*" -path="$path/$path/$path" -bfs_diff deep -path "deep/$path" -nouser +bfs_diff deep -type f -nouser -- cgit v1.2.3