From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: Git mailing list <git@vger.kernel.org>
Cc: Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
Date: Thu, 19 Nov 2026 23:03:32 +0530 [thread overview]
Message-ID: <2bcce580-f5ed-47e9-bd3e-1e238eb90d5c@gmail.com> (raw)
In-Reply-To: <20261119-ks-ci-long-test-hang-fix-v2-1-37011c08380d@gmail.com>
On 11/19/26 22:59, Kaartic Sivaraam wrote:
> Changes in v2:
> - Corrected commit messages as per Patrick's suggestions
> - Tweaked the shell function comment to avoid mentioning 'prove --jobs'
> - Made the owner and waiting variables local within acquire_expensive_lock_
>
> Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
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
+}
--
Sivaraam
prev parent reply other threads:[~2026-11-19 17:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-19 10:07 ` Patrick Steinhardt
2026-11-19 17:12 ` Kaartic Sivaraam
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
2026-11-19 17:33 ` Kaartic Sivaraam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2bcce580-f5ed-47e9-bd3e-1e238eb90d5c@gmail.com \
--to=kaartic.sivaraam@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox