Skip to content

Commit cb88b37

Browse files
chiyutianyigitster
authored andcommitted
t5330: remove run_with_limited_processses()
run_with_limited_processses() is used to end the loop faster when an infinite loop happen. But "ulimit" is tied to the entire development station, and the test will fail due to too many other processes or using "--stress". Without run_with_limited_processses() the infinite loop can also be stopped due to global configrations or quotas, and the verification still works fine. So let's remove run_with_limited_processses(). Signed-off-by: Han Xin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3a1ea94 commit cb88b37

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

t/t5330-no-lazy-fetch-with-commit-graph.sh

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,6 @@ test_description='test for no lazy fetch with the commit-graph'
44

55
. ./test-lib.sh
66

7-
run_with_limited_processses () {
8-
# bash and ksh use "ulimit -u", dash uses "ulimit -p"
9-
if test -n "$BASH_VERSION"
10-
then
11-
ulimit_max_process="-u"
12-
elif test -n "$KSH_VERSION"
13-
then
14-
ulimit_max_process="-u"
15-
fi
16-
(ulimit ${ulimit_max_process-"-p"} 512 && "$@")
17-
}
18-
19-
test_lazy_prereq ULIMIT_PROCESSES '
20-
run_with_limited_processses true
21-
'
22-
23-
if ! test_have_prereq ULIMIT_PROCESSES
24-
then
25-
skip_all='skipping tests for no lazy fetch with the commit-graph, ulimit processes not available'
26-
test_done
27-
fi
28-
297
test_expect_success 'setup: prepare a repository with a commit' '
308
git init with-commit &&
319
test_commit -C with-commit the-commit &&
@@ -59,8 +37,7 @@ test_expect_success 'fetch any commit from promisor with the usage of the commit
5937
git -C with-commit-graph config remote.origin.partialclonefilter blob:none &&
6038
test_commit -C with-commit any-commit &&
6139
anycommit=$(git -C with-commit rev-parse HEAD) &&
62-
63-
run_with_limited_processses env GIT_TRACE="$(pwd)/trace.txt" \
40+
GIT_TRACE="$(pwd)/trace.txt" \
6441
git -C with-commit-graph fetch origin $anycommit 2>err &&
6542
! grep "fatal: promisor-remote: unable to fork off fetch subprocess" err &&
6643
grep "git fetch origin" trace.txt >actual &&

0 commit comments

Comments
 (0)