summaryrefslogtreecommitdiff
path: root/t/t5324-split-commit-graph.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-05-01 13:39:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-01 13:39:53 -0700
commitcf054f817a30cf4a6531548f52cd7d5cbed6f4fc (patch)
tree1a22fdf3be94217a1427f8728dc1bf3a0e25692e /t/t5324-split-commit-graph.sh
parentMerge branch 'tb/commit-graph-split-strategy' (diff)
parentcommit-graph: close descriptors after mmap (diff)
downloadtgif-cf054f817a30cf4a6531548f52cd7d5cbed6f4fc.tar.xz
Merge branch 'tb/commit-graph-fd-exhaustion-fix'
The commit-graph code exhausted file descriptors easily when it does not have to. * tb/commit-graph-fd-exhaustion-fix: commit-graph: close descriptors after mmap commit-graph.c: gracefully handle file descriptor exhaustion t/test-lib.sh: make ULIMIT_FILE_DESCRIPTORS available to tests commit-graph.c: don't use discarded graph_name in error
Diffstat (limited to 't/t5324-split-commit-graph.sh')
-rwxr-xr-xt/t5324-split-commit-graph.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index 3378ec54cd..4146b82031 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -387,4 +387,17 @@ test_expect_success '--split=replace replaces the chain' '
graph_read_expect 2
'
+test_expect_success ULIMIT_FILE_DESCRIPTORS 'handles file descriptor exhaustion' '
+ git init ulimit &&
+ (
+ cd ulimit &&
+ for i in $(test_seq 64)
+ do
+ test_commit $i &&
+ test_might_fail run_with_limited_open_files git commit-graph write \
+ --split=no-merge --reachable || return 1
+ done
+ )
+'
+
test_done