Test fix "too many open files" on macOS (#14853)

On macOS, running `make test` often fails with "too many open files" due
to the low default limit (usually 256).

This PR increases the limit by adding `ulimit -n 4096` so that the tests
have enough file descriptors for concurrent connections.
This commit is contained in:
Vitah Lin authored and GitHub committed 2026-05-20 19:01:45 +08:00
1 parent 95040d61d5
commit 457a1a542d
4 files changed
+20

No files matched your search

+5
View File
@@ -1,4 +1,9 @@
#!/bin/sh
# Raise open files limit (macOS default 256 is too low for tests).
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
ulimit -n 1024 2>/dev/null || true
fi
TCL_VERSIONS="8.5 8.6 8.7 9.0"
TCLSH=""
+5
View File
@@ -1,4 +1,9 @@
#!/bin/sh
# Raise open files limit (macOS default 256 is too low for tests).
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
ulimit -n 1024 2>/dev/null || true
fi
TCL_VERSIONS="8.5 8.6 8.7 9.0"
TCLSH=""
+5
View File
@@ -1,4 +1,9 @@
#!/bin/sh
# Raise open files limit (macOS default 256 is too low for tests).
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
ulimit -n 1024 2>/dev/null || true
fi
TCL_VERSIONS="8.5 8.6 8.7 9.0"
TCLSH=""
[ -z "$MAKE" ] && MAKE=make
+5
View File
@@ -1,4 +1,9 @@
#!/bin/sh
# Raise open files limit (macOS default 256 is too low for tests).
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
ulimit -n 1024 2>/dev/null || true
fi
TCL_VERSIONS="8.5 8.6 8.7 9.0"
TCLSH=""