git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Nov 19, 2026, 17:33 UTC
Message-ID
<2bcce580-f5ed-47e9-bd3e-1e238eb90d5c@gmail.com>
In-Reply-To
<20261119-ks-ci-long-test-hang-fix-v2-1-37011c08380d@gmail.com>
On 11/19/26 22:59, Kaartic Sivaraam wrote:
Show 5 quoted lines
> 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
Previous: Kaartic Sivaraam
Message 5 of 5 in “test-lib: run EXPENSIVE tests one at a time”
  1. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 19, 2026
  2. Patrick SteinhardtNov 19, 2026
  3. Kaartic SivaraamNov 19, 2026
  4. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 19, 2026
  5. Kaartic SivaraamNov 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.