summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 13ba00d..1b22195 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1666,6 +1666,15 @@ test_lazy_prereq ULIMIT_STACK_SIZE '
run_with_limited_stack true
'
+run_with_limited_open_files () {
+ (ulimit -n 32 && "$@")
+}
+
+test_lazy_prereq ULIMIT_FILE_DESCRIPTORS '
+ test_have_prereq !MINGW,!CYGWIN &&
+ run_with_limited_open_files true
+'
+
build_option () {
git version --build-options |
sed -ne "s/^$1: //p"