I thought b4 would've included it by itself. Anyways, here's the range-diff:
1: f0664ff4ee ! 1: fbf773f39a test-lib: run EXPENSIVE tests one at a time
@@ Metadata
## Commit message ##
test-lib: run EXPENSIVE tests one at a time - Recently, we've acquired quite a few expensive test in our test suite.
+ Recently, we've acquired quite a few expensive tests in our test suite.
For instance, these commits add several tests that require
- multi-gigabytes:
+ multi-gigabytes of memory: - 9048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
@@ t/test-lib.sh: fail_117 () {
return 117
} -+# EXPENSIVE tests can need many gigabytes of memory or disk, so two of
-+# them running at the same time under "prove --jobs" can exhaust the
-+# machine. Allow only one at a time across all test scripts that share
++# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
++# them running at the same time can exhaust the machine.
++#
++# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
++ local owner waited=
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
+ while ! mkdir "$expensive_lock_" 2>/dev/null
+ do
@@ t/test-lib.sh: fail_117 () {
+ rm -rf "$expensive_lock_"
+ continue
+ fi
-+ if test -z "$expensive_lock_waited_"
++ if test -z "$waited"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
-+ expensive_lock_waited_=t
++ waited=t
+ fi
+ sleep 1
+ done
-+ expensive_lock_waited_=
+ echo $$ >"$expensive_lock_/pid"
+ have_expensive_lock_=t
+}