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 <hanxin.hx@bytedance.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Han Xin committed Jul 12, 2022 at 16:01 UTC cb88b37cb9f711f702ea3d1ec3226db44081b454
1 file changed +1 -24
t/t5330-no-lazy-fetch-with-commit-graph.sh
+1 -24
@@ -4,28 +4,6 @@ test_description='test for no lazy fetch with the commit-graph'
4
5 . ./test-lib.sh
6
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 -
7 test_expect_success 'setup: prepare a repository with a commit' '
8 git init with-commit &&
9 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
37 git -C with-commit-graph config remote.origin.partialclonefilter blob:none &&
38 test_commit -C with-commit any-commit &&
39 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" \
41 git -C with-commit-graph fetch origin $anycommit 2>err &&
42 ! grep "fatal: promisor-remote: unable to fork off fetch subprocess" err &&
43 grep "git fetch origin" trace.txt >actual &&