Volume XXII, number 280Wednesday, October 7, 2026Latest message 50 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

patch, 9 partst: fixes and improvements for GIT_TEST_LONG

33 messages between Jul 2, 2026 and Jul 6, 2026, from Patrick Steinhardt, SZEDER Gábor, Jeff King, Junio C Hamano.

Plain Markdown or JSON for tools and agents. Diffs are folded; open one to read it.

Patrick SteinhardtJul 2, 2026, 12:00 UTC on lore
Hi,

this series started out as a simple two-patch series that wired up the GitLab CI badge in our README and GIT_TEST_LONG for GitLab CI. But as it typically goes, tests broke on GitLab CI, which made me realize that they are broken even on GitHub's master branch right now. Some tests are failing in the linux32 job, and we only didn't notice because the whole pipeline hangs.

So I had to go down the rabbit hole a bit, the result of which is this patch series.

Thanks!
Patrick
[1]: <akIfsaVMB_S6kfJQ@pks.im>
---
Patrick Steinhardt (9):
      README: add GitLab CI badge to make it more discoverable
      t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
      t4141: fix inefficient use of dd(1)
      t5608: reduce maximum disk usage
      t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
      t7900: clean up large EXPENSIVE repository
      t: use `test_bool_env` to parse GIT_TEST_LONG
      gitlab-ci: disable RAM disk on macOS jobs
      gitlab-ci: enable "GIT_TEST_LONG"
 .gitlab-ci.yml             | 13 ++++-----
 README.md                  |  3 ++-
 ci/lib.sh                  | 12 +++++++--
 t/t0021-conversion.sh      |  2 +-
 t/t4141-apply-too-large.sh |  7 +++--
 t/t5608-clone-2gb.sh       | 66 ++++++++++++++++++++++++----------------------
 t/t7508-status.sh          |  2 +-
 t/t7900-maintenance.sh     | 56 +++++++++++++++++++++------------------
 t/test-lib.sh              |  4 +--
 9 files changed, 92 insertions(+), 73 deletions(-)

--- base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc change-id: 20260701-b4-pks-t-fixes-for-GIT-TEST-LONG-78e538bf0e06

Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 1/9] README: add GitLab CI badge to make it more discoverable

The Git project uses CI systems from both GitHub and GitLab. While both of these systems are extensively used in day-to-day work, we only have a link to the GitHub Workflows in our README, which makes the GitLab CI hard to discover.

Improve the situation by adding a second badge for GitLab CI to our README.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to README.md +2 −1
diff --git a/README.md b/README.md
index d87bca1b8c..46489b0971 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-[![Build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
+[![GitHub build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
+[![GitLab build status](https://gitlab.com/git-scm/git/badges/master/pipeline.svg)](https://gitlab.com/git-scm/git/-/pipelines?ref=master)
 
 Git - fast, scalable, distributed revision control system
 =========================================================
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

One of the tests in t0021 writes a 2GB file and then roundtrips it through the clean/sumdge filters. This test is broken on 32 bit platforms because they typically don't handle files larger then `SSIZE_MAX` well at all.

While our CI has a "linux32" job that should in theory hit this issue, we never noticed it because we didn't use to run EXPENSIVE tests until 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08). And after that commit, the test does not fail but instead hangs completely.

Ideally, we'd of course properly detect this situation and then test for it. In practice, this turns out to be hard as the test failure are not reliable as they often (but not always) run into ENOMEM errors.

Instead, skip the test altogether.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t0021-conversion.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t0021-conversion.sh +1 −1
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 033b00a364..7b9a0ca877 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -296,7 +296,7 @@ test_expect_success 'filter that does not read is fine' '
 	test_cmp expect actual
 '
 
-test_expect_success EXPENSIVE 'filter large file' '
+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '
 	test_config filter.largefile.smudge cat &&
 	test_config filter.largefile.clean cat &&
 	test_seq -f "%1048576d" 1 2048 >2GB &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 3/9] t4141: fix inefficient use of dd(1)

In t4141 we generate a patch that is roughly 1GB in size to verify that git-apply(1) indeed rejects that patch. We generate that patch by prepending a patch header and then executing `test-tool genzeros` without a limit. This causes us to print infinitely many zeros, and we limit the overall amount of generated bytes via `test_copy_bytes`.

This test setup is extremely expensive, as `test_copy_bytes` is implemented via `dd ibs=1 count="$1"`, which copies data one byte at a time. So as we write 1GB of data, we end up doing 1 billion reads and writes. This naturally takes a while: it takes 6 minutes on my system, and around 40 minutes in some CI jobs!

We can do much better though, as genzeros already knows to handle an optional limit of how much data it is supposed to write, which allows us to remove the call to `test_copy_bytes`. Furthermore, it has already been optimized to generate the data fast.

And indeed, doing this conversion drops the test execution to less than a second on my machine, so that we can drop the EXPENSIVE prerequisite.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t4141-apply-too-large.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Show changes to t/t4141-apply-too-large.sh +3 −4
diff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh
index eac6f7e151..dad67779ed 100755
--- a/t/t4141-apply-too-large.sh
+++ b/t/t4141-apply-too-large.sh
@@ -4,8 +4,7 @@ test_description='git apply with too-large patch'
 
 . ./test-lib.sh
 
-test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
-	sz=$((1024 * 1024 * 1023)) &&
+test_expect_success 'git apply rejects patches that are too large' '
 	{
 		cat <<-\EOF &&
 		diff --git a/file b/file
@@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
 		+++ b/file
 		@@ -0,0 +1 @@
 		EOF
-		test-tool genzeros
-	} | test_copy_bytes $sz | test_must_fail git apply 2>err &&
+		test-tool genzeros $((1024 * 1024 * 1023))
+	} | test_must_fail git apply 2>err &&
 	grep "patch too large" err
 '
 
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 4/9] t5608: reduce maximum disk usage

The tests in t5608 perform a couple of clones of repositories that are somewhat large. Ultimately, we end up creating:

  - A setup repository that contains 2GB of uncompressed pack data.
  - A bare clone that contains the same 2GB of data.
  - A clone with worktree writes a 2GB packfile and a 2GB worktree.
  - A second setup repository that contains a 4GB packfile.
  - Two 4GB clone of that repository.

Some of these clones ultimately hardlink files, which ensures that we at least don't end up with more than 20GB of data. But at the end of the test we still have around 16GB of data, which is only a tiny bit better.

Refactor the test to prune repositories after they have no use anymore. This reduced the peak disk usage of this test to 8GB.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t5608-clone-2gb.sh | 66 ++++++++++++++++++++++++++++------------------------
 1 file changed, 35 insertions(+), 31 deletions(-)
Show changes to t/t5608-clone-2gb.sh +35 −31
diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh
index 4f8a95ddda..5d56debf1c 100755
--- a/t/t5608-clone-2gb.sh
+++ b/t/t5608-clone-2gb.sh
@@ -10,45 +10,47 @@ then
 fi
 
 test_expect_success 'setup' '
-
-	git config pack.compression 0 &&
-	git config pack.depth 0 &&
-	blobsize=$((100*1024*1024)) &&
-	blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
-	i=1 &&
-	(while test $i -le $blobcount
-	 do
-		printf "Generating blob $i/$blobcount\r" >&2 &&
-		printf "blob\nmark :$i\ndata $blobsize\n" &&
-		#test-tool genrandom $i $blobsize &&
-		printf "%-${blobsize}s" $i &&
-		echo "M 100644 :$i $i" >> commit &&
-		i=$(($i+1)) ||
-		echo $? > exit-status
-	 done &&
-	 echo "commit refs/heads/main" &&
-	 echo "author A U Thor <author@email.com> 123456789 +0000" &&
-	 echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
-	 echo "data 5" &&
-	 echo ">2gb" &&
-	 cat commit) |
-	git fast-import --big-file-threshold=2 &&
-	test ! -f exit-status
-
+	git init 2gb-repo &&
+	(
+		cd 2gb-repo &&
+		git config pack.compression 0 &&
+		git config pack.depth 0 &&
+		blobsize=$((100*1024*1024)) &&
+		blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
+		i=1 &&
+		(while test $i -le $blobcount
+		 do
+			printf "Generating blob $i/$blobcount\r" >&2 &&
+			printf "blob\nmark :$i\ndata $blobsize\n" &&
+			#test-tool genrandom $i $blobsize &&
+			printf "%-${blobsize}s" $i &&
+			echo "M 100644 :$i $i" >> commit &&
+			i=$(($i+1)) ||
+			echo $? > exit-status
+		 done &&
+		 echo "commit refs/heads/main" &&
+		 echo "author A U Thor <author@email.com> 123456789 +0000" &&
+		 echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
+		 echo "data 5" &&
+		 echo ">2gb" &&
+		 cat commit) |
+		git fast-import --big-file-threshold=2 &&
+		test ! -f exit-status
+	)
 '
 
 test_expect_success 'clone - bare' '
-
-	git clone --bare --no-hardlinks . clone-bare
-
+	test_when_finished rm -rf clone-bare &&
+	git clone --bare --no-hardlinks 2gb-repo clone-bare
 '
 
 test_expect_success 'clone - with worktree, file:// protocol' '
-
-	git clone "file://$(pwd)" clone-wt
-
+	test_when_finished rm -rf clone-wt &&
+	git clone "file://$(pwd)/2gb-repo" clone-wt
 '
 
+rm -rf 2gb-repo 2>/dev/null
+
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '
 	large_blob_size=$((4*1024*1024*1024+1)) &&
 	git init --bare 4gb-repo &&
@@ -61,6 +63,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '
 '
 
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-objects' '
+	test_when_finished rm -rf 4gb-clone-unpack &&
 	# The synthesized pack has five objects, so a large unpack limit keeps
 	# fetch-pack on the unpack-objects path.
 	git -c fetch.unpackLimit=100 clone --bare \
@@ -77,6 +80,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-obje
 '
 
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone with >4GB object via index-pack' '
+	test_when_finished rm -rf 4gb-clone-index &&
 	# Force fetch-pack to hand the pack to index-pack instead.
 	git -c fetch.unpackLimit=1 clone --bare \
 		"file://$(pwd)/4gb-repo" 4gb-clone-index &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

One of the tests in t7508 is marked as EXPENSIVE because it ends up creating and adding files that are multiple gigabytes in size. This takes a while to complete, hence the EXPENSIVE prerequisite.

Besides being expensive though the test can only work on systems where `size_t` is at least 64 bit. This is because one of the created files is larger than 4GB, and because Git tracks object size via `size_t` it will eventually blow up.

This test has also been blowing up in the "linux32" CI job in GitHub Workflows since 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08). But that job doesn't only fail, it also hangs, and that has been concealing the failure.

Fix the issue by marking the test as requiring 64 bit `size_t`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t7508-status.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7508-status.sh +1 −1
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c2057bc94c..dfdd78b6fe 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1773,7 +1773,7 @@ test_expect_success 'slow status advice when core.untrackedCache true, and fsmon
 	)
 '
 
-test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '
+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '
 	(
 		mkdir large-file &&
 		cd large-file &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:00 UTC in reply to Patrick Steinhardt on lore

[PATCH 6/9] t7900: clean up large EXPENSIVE repository

One of the tests in t7900 is marked with EXPENSIVE because we create a repository with 2GB of data that we end up repacking. We never clean up that repository though, so we occupy the full 2GB of data until the end of the test suite. Besides clogging our disk, it also means that all subsequent tests may have to repack this data multiple times.

Adapt the test so that we create the data in a standalone repository that we clean up at the end of the test. While at it, also disable auto-maintenance so that it does not race with our manual maintenance.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t7900-maintenance.sh | 56 ++++++++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 25 deletions(-)
Show changes to t/t7900-maintenance.sh +31 −25
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index d7f82e1bec..8a7e1306d0 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -461,36 +461,42 @@ test_expect_success 'incremental-repack task' '
 '
 
 test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
-	test_config core.compression 0 &&
+	test_when_finished rm -rf expensive-repo &&
+	git init expensive-repo &&
+	(
+		cd expensive-repo &&
+		git config set core.compression 0 &&
+		git config set maintenance.auto false &&
 
-	for i in $(test_seq 1 5)
-	do
-		test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
-		return 1
-	done &&
-	git add big &&
-	git commit -qm "Add big file (1)" &&
+		for i in $(test_seq 1 5)
+		do
+			test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+			return 1
+		done &&
+		git add big &&
+		git commit -qm "Add big file (1)" &&
 
-	# ensure any possible loose objects are in a pack-file
-	git maintenance run --task=loose-objects &&
+		# ensure any possible loose objects are in a pack-file
+		git maintenance run --task=loose-objects &&
 
-	rm big &&
-	for i in $(test_seq 6 10)
-	do
-		test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
-		return 1
-	done &&
-	git add big &&
-	git commit -qm "Add big file (2)" &&
+		rm big &&
+		for i in $(test_seq 6 10)
+		do
+			test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+			return 1
+		done &&
+		git add big &&
+		git commit -qm "Add big file (2)" &&
 
-	# ensure any possible loose objects are in a pack-file
-	git maintenance run --task=loose-objects &&
+		# ensure any possible loose objects are in a pack-file
+		git maintenance run --task=loose-objects &&
 
-	# Now run the incremental-repack task and check the batch-size
-	GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
-		--task=incremental-repack 2>/dev/null &&
-	test_subcommand git multi-pack-index repack \
-		 --no-progress --batch-size=2147483647 <run-2g.txt
+		# Now run the incremental-repack task and check the batch-size
+		GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
+			--task=incremental-repack 2>/dev/null &&
+		test_subcommand git multi-pack-index repack \
+			--no-progress --batch-size=2147483647 <run-2g.txt
+	)
 '
 
 run_incremental_repack_and_verify () {
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:01 UTC in reply to Patrick Steinhardt on lore

[PATCH 7/9] t: use `test_bool_env` to parse GIT_TEST_LONG

It's currently hard to explicitly disable GIT_TEST_LONG by setting it to `false`. Fix this by using `test_bool_env` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/lib.sh     | 2 +-
 t/test-lib.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Show changes to 2 files +3 −3

ci/lib.sh, t/test-lib.sh

diff --git a/ci/lib.sh b/ci/lib.sh
index b939110a6e..01a0bc6b75 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -321,7 +321,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable the long tests for pushes to the integration branches as well.
 case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-	export GIT_TEST_LONG=YesPlease
+	export GIT_TEST_LONG=true
 	;;
 esac
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ceefb99bff..623fcfb747 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -210,7 +210,7 @@ parse_option () {
 	-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
 		immediate=t ;;
 	-l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
-		GIT_TEST_LONG=t; export GIT_TEST_LONG ;;
+		GIT_TEST_LONG=true; export GIT_TEST_LONG ;;
 	-r)
 		mark_option_requires_arg "$opt" run_list
 		;;
@@ -1849,7 +1849,7 @@ test_lazy_prereq AUTOIDENT '
 '
 
 test_lazy_prereq EXPENSIVE '
-	test -n "$GIT_TEST_LONG"
+	test_bool_env GIT_TEST_LONG false
 '
 
 test_lazy_prereq EXPENSIVE_ON_WINDOWS '
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:01 UTC in reply to Patrick Steinhardt on lore

[PATCH 8/9] gitlab-ci: disable RAM disk on macOS jobs

When we added the macOS jobs to GitLab CI in 56090a35ab (ci: add macOS jobs to GitLab CI, 2024-01-18) we had to work around some very slow disks. This workaround essentially creates a RAM disk that we mount, where all test data is being written into RAM instead of the real disk.

In the next commit though we're about to enable "GIT_TEST_LONG", which will make tests run that are marked with the "EXPENSIVE" prerequisite. This change will make a couple of tests run that write up to 8GB of data into the test output directory. As our RAM disk is only 4GB in size, this change will cause ENOSPC errors.

We could accommodate for this by increasing the size of the RAM disk. In c9d708b7fc (gitlab-ci: upgrade macOS runners, 2026-05-21) we have upgraded our runners to use the "large" runners, which have 16GB of RAM available. So we could easily expand the RAM disk to a capacity of for example 12GB. But some test runs have shown that this is still quite flaky overall, as we get quite close to our limits.

Instead, drop the workaround completely. This does indeed slow down execution of the test jobs:

  - osx-clang goes from 18 minutes to 25 minutes
  - osx-meson goes from 21 minutes to 33 minutes
  - osx-reftable stays at 21 minutes

The last one seems like an outlier. The only explanation that I have is that we end up writing significantly less files with the reftable backend, which ultimately causes less I/O.

Overall though, it's preferable to have something that works with the least amount of flakiness compared to having something else that is faster but unstable. Despite that, the macOS jobs aren't even the slowest jobs, so this doesn't extend the overall pipeline's length.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .gitlab-ci.yml | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
Show changes to .gitlab-ci.yml +1 −6
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a8e90932c..a4aebe8b71 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -88,13 +88,8 @@ test:osx:
   tags:
     - saas-macos-large-m2pro
   variables:
-    TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
+    TEST_OUTPUT_DIRECTORY: "/tmp/test-output"
   before_script:
-    # Create a 4GB RAM disk that we use to store test output on. This small hack
-    # significantly speeds up tests by more than a factor of 2 because the
-    # macOS runners use network-attached storage as disks, which is _really_
-    # slow with the many small writes that our tests do.
-    - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
     - ./ci/install-dependencies.sh
   script:
     - ./ci/run-build-and-tests.sh
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 2, 2026, 12:01 UTC in reply to Patrick Steinhardt on lore

[PATCH 9/9] gitlab-ci: enable "GIT_TEST_LONG"

Starting with 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08) we run expensive tests in our CI for certain events. So far, this has only been wired up for GitHub Workflows though, which creates a test gap for GitLab CI.

Plug this gap by also making this work for the latter.

Note that these tests cannot be run on the Windows runners, as they only have 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests, so we explicitly disable "GIT_TEST_LONG" on these jobs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .gitlab-ci.yml |  6 ++++++
 ci/lib.sh      | 12 ++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
Show changes to 2 files +16 −2

.gitlab-ci.yml, ci/lib.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4aebe8b71..1c4d04da9d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,6 +147,9 @@ test:mingw64:
   needs:
     - job: "build:mingw64"
       artifacts: true
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   before_script:
     - *windows_before_script
     - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
@@ -195,6 +198,9 @@ test:msvc-meson:
   script:
     - |
       & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   after_script:
     - |
       if ($env:CI_JOB_STATUS -ne "success") {
diff --git a/ci/lib.sh b/ci/lib.sh
index 01a0bc6b75..6c52154eac 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -215,6 +215,7 @@ then
 	test macos != "$CI_OS_NAME" || CI_OS_NAME=osx
 	CI_REPO_SLUG="$GITHUB_REPOSITORY"
 	CI_JOB_ID="$GITHUB_RUN_ID"
+	CI_EVENT="$GITHUB_EVENT_NAME"
 	CC="${CC_PACKAGE:-${CC:-gcc}}"
 	DONT_SKIP_TAGS=t
 	handle_failed_tests () {
@@ -239,6 +240,13 @@ then
 	CI_BRANCH="$CI_COMMIT_REF_NAME"
 	CI_COMMIT="$CI_COMMIT_SHA"
 
+	case "$CI_PIPELINE_SOURCE" in
+	merge_request_event)
+		CI_EVENT=pull_request;;
+	*)
+		CI_EVENT="$CI_PIPELINE_SOURCE";;
+	esac
+
 	case "$OS,$CI_JOB_IMAGE" in
 	Windows_NT,*)
 		CI_OS_NAME=windows
@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable "expensive" tests for PR events.
 # In order to catch bugs introduced at integration time by mismerges,
 # enable the long tests for pushes to the integration branches as well.
-case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
+case "$CI_EVENT,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-	export GIT_TEST_LONG=true
+	export GIT_TEST_LONG=${GIT_TEST_LONG:-true}
 	;;
 esac
 
-- 
2.55.0.795.g602f6c329a.dirty
SZEDER GáborJul 2, 2026, 17:49 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)

On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:
Show 19 quoted lines
> In t4141 we generate a patch that is roughly 1GB in size to verify that
> git-apply(1) indeed rejects that patch. We generate that patch by
> prepending a patch header and then executing `test-tool genzeros`
> without a limit. This causes us to print infinitely many zeros, and we
> limit the overall amount of generated bytes via `test_copy_bytes`.
> 
> This test setup is extremely expensive, as `test_copy_bytes` is
> implemented via `dd ibs=1 count="$1"`, which copies data one byte at a
> time. So as we write 1GB of data, we end up doing 1 billion reads and
> writes. This naturally takes a while: it takes 6 minutes on my system,
> and around 40 minutes in some CI jobs!
> 
> We can do much better though, as genzeros already knows to handle an
> optional limit of how much data it is supposed to write, which allows us
> to remove the call to `test_copy_bytes`. Furthermore, it has already
> been optimized to generate the data fast.
> 
> And indeed, doing this conversion drops the test execution to less than
> a second on my machine, so that we can drop the EXPENSIVE prerequisite.

EXPENSIVE is not only about execution time, but about resources in general. While the modified test finishes quite fast indeed, 'git apply' uses over 1GB of RSS. Therefore, the EXPENSIVE prerequisite should be kept.

Show 34 quoted lines
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  t/t4141-apply-too-large.sh | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh
> index eac6f7e151..dad67779ed 100755
> --- a/t/t4141-apply-too-large.sh
> +++ b/t/t4141-apply-too-large.sh
> @@ -4,8 +4,7 @@ test_description='git apply with too-large patch'
>  
>  . ./test-lib.sh
>  
> -test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
> -	sz=$((1024 * 1024 * 1023)) &&
> +test_expect_success 'git apply rejects patches that are too large' '
>  	{
>  		cat <<-\EOF &&
>  		diff --git a/file b/file
> @@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
>  		+++ b/file
>  		@@ -0,0 +1 @@
>  		EOF
> -		test-tool genzeros
> -	} | test_copy_bytes $sz | test_must_fail git apply 2>err &&
> +		test-tool genzeros $((1024 * 1024 * 1023))
> +	} | test_must_fail git apply 2>err &&
>  	grep "patch too large" err
>  '
>  
> 
> -- 
> 2.55.0.795.g602f6c329a.dirty
> 
Jeff KingJul 2, 2026, 21:16 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)

On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:
Show 10 quoted lines
> This test setup is extremely expensive, as `test_copy_bytes` is
> implemented via `dd ibs=1 count="$1"`, which copies data one byte at a
> time. So as we write 1GB of data, we end up doing 1 billion reads and
> writes. This naturally takes a while: it takes 6 minutes on my system,
> and around 40 minutes in some CI jobs!
> 
> We can do much better though, as genzeros already knows to handle an
> optional limit of how much data it is supposed to write, which allows us
> to remove the call to `test_copy_bytes`. Furthermore, it has already
> been optimized to generate the data fast.

Seems like a good fix for this case, where we can skip the extra process entirely.

It feels like test_copy_bytes should be able to do much better in general. The obvious thing to reach for is "head -c", but the function was originally added because that wasn't portable. The "-c" option is not in POSIX, though the original comment claims IRIX was the problem, so I wonder if "head -c" is de facto portable these days.

I'd use perl of course. ;) The history here is somewhat amusing. We originally did use dd, but that changed in 4de0bbd898 (t9300: use perl "head -c" clone in place of "dd bs=1 count=16000" kluge, 2010-12-13) because dd was slow. The code moved to test-lib.sh in 48860819e8 (t9300: factor out portable "head -c" replacement, 2016-06-30), where I rejected the dd solution because it was slow. And then the perl turned back into dd in 01486b5de8 (t: adapt `test_copy_bytes()` to not use Perl, 2025-04-03), becoming slow again.

Chesterton's fence at work?
-Peff
Jeff KingJul 2, 2026, 21:22 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

On Thu, Jul 02, 2026 at 02:00:58PM +0200, Patrick Steinhardt wrote:
> This test has also been blowing up in the "linux32" CI job in GitHub
> Workflows since 7a094d68a2 (ci: run expensive tests on push builds to
> integration branches, 2026-05-08). But that job doesn't only fail, it
> also hangs, and that has been concealing the failure.

One thing I don't understand about this and a few other patches in this series: I've been getting passing GitHub Actions runs, including linux32, even after that commit turned on the expensive jobs.

From your description it sounds like it should _never_ work, but it does for me. It's possible there's something going on in my CI builds that would cause the expensive tests not to run, but I don't think so. Am I misunderstanding the problem? Or is there something missing from the analysis?

-Peff
Jeff KingJul 2, 2026, 21:30 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository

On Thu, Jul 02, 2026 at 02:00:59PM +0200, Patrick Steinhardt wrote:
Show 5 quoted lines
> One of the tests in t7900 is marked with EXPENSIVE because we create a
> repository with 2GB of data that we end up repacking. We never clean up
> that repository though, so we occupy the full 2GB of data until the end
> of the test suite. Besides clogging our disk, it also means that all
> subsequent tests may have to repack this data multiple times.

Hmm, I hoped this would drop the time to run t7900 with --long, but it takes about 1m40s both before and after your patch (vs ~6s without --long). Just looking at the script, I'd guess that it's because the subsequent repacks are mostly incremental or geometric, so they don't need to write the big pack.

Oh well. It still seems like an obvious improvement, though, both in terms of peak disk usage and avoiding unwanted surprises when more tests are added later.

-Peff
Jeff KingJul 2, 2026, 22:18 UTC in reply to Jeff King on lore

Re: [PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

On Thu, Jul 02, 2026 at 05:22:35PM -0400, Jeff King wrote:
Show 16 quoted lines
> On Thu, Jul 02, 2026 at 02:00:58PM +0200, Patrick Steinhardt wrote:
> 
> > This test has also been blowing up in the "linux32" CI job in GitHub
> > Workflows since 7a094d68a2 (ci: run expensive tests on push builds to
> > integration branches, 2026-05-08). But that job doesn't only fail, it
> > also hangs, and that has been concealing the failure.
> 
> One thing I don't understand about this and a few other patches in this
> series: I've been getting passing GitHub Actions runs, including
> linux32, even after that commit turned on the expensive jobs.
> 
> From your description it sounds like it should _never_ work, but it does
> for me. It's possible there's something going on in my CI builds that
> would cause the expensive tests not to run, but I don't think so. Am I
> misunderstanding the problem? Or is there something missing from the
> analysis?

Ah, nevermind. It _is_ my setup. We run the expensive tests only on pull requests, or when pushing to some specific branches, none of which match the name of my particular integration branch.

Given all of the headaches I'm hesitant to "fix" my setup to run them, but I probably should. ;)

-Peff
Patrick SteinhardtJul 3, 2026, 05:42 UTC in reply to Jeff King on lore

Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)

On Thu, Jul 02, 2026 at 05:16:14PM -0400, Jeff King wrote:
Show 21 quoted lines
> On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:
> 
> > This test setup is extremely expensive, as `test_copy_bytes` is
> > implemented via `dd ibs=1 count="$1"`, which copies data one byte at a
> > time. So as we write 1GB of data, we end up doing 1 billion reads and
> > writes. This naturally takes a while: it takes 6 minutes on my system,
> > and around 40 minutes in some CI jobs!
> > 
> > We can do much better though, as genzeros already knows to handle an
> > optional limit of how much data it is supposed to write, which allows us
> > to remove the call to `test_copy_bytes`. Furthermore, it has already
> > been optimized to generate the data fast.
> 
> Seems like a good fix for this case, where we can skip the extra process
> entirely.
> 
> It feels like test_copy_bytes should be able to do much better in
> general. The obvious thing to reach for is "head -c", but the function
> was originally added because that wasn't portable. The "-c" option is
> not in POSIX, though the original comment claims IRIX was the problem,
> so I wonder if "head -c" is de facto portable these days.

An alternative could be to implement a simple helper as part of our test-tool. But I doubt it's really worth it: almost all callers only want to copy a small number of bytes. The only exception seems to be t0021, where we copy up to 65kB. But that whole test suite still only takes ~3 seconds, so optimizing that feels like wasted time to me.

Patrick
Patrick SteinhardtJul 3, 2026, 05:42 UTC in reply to Jeff King on lore

Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository

On Thu, Jul 02, 2026 at 05:30:44PM -0400, Jeff King wrote:
Show 17 quoted lines
> On Thu, Jul 02, 2026 at 02:00:59PM +0200, Patrick Steinhardt wrote:
> 
> > One of the tests in t7900 is marked with EXPENSIVE because we create a
> > repository with 2GB of data that we end up repacking. We never clean up
> > that repository though, so we occupy the full 2GB of data until the end
> > of the test suite. Besides clogging our disk, it also means that all
> > subsequent tests may have to repack this data multiple times.
> 
> Hmm, I hoped this would drop the time to run t7900 with --long, but it
> takes about 1m40s both before and after your patch (vs ~6s without
> --long). Just looking at the script, I'd guess that it's because the
> subsequent repacks are mostly incremental or geometric, so they don't
> need to write the big pack.
> 
> Oh well. It still seems like an obvious improvement, though, both in
> terms of peak disk usage and avoiding unwanted surprises when more tests
> are added later.

Yeah, the commit message is a bit hand-wavy there indeed. I think the bigger argument here is that having a test that is marked as EXPENSIVE and that may influence subsequent tests is just a bad idea.

Patrick
Patrick SteinhardtJul 3, 2026, 05:42 UTC in reply to SZEDER Gábor on lore

Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)

On Thu, Jul 02, 2026 at 07:49:50PM +0200, SZEDER Gábor wrote:
Show 25 quoted lines
> On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:
> > In t4141 we generate a patch that is roughly 1GB in size to verify that
> > git-apply(1) indeed rejects that patch. We generate that patch by
> > prepending a patch header and then executing `test-tool genzeros`
> > without a limit. This causes us to print infinitely many zeros, and we
> > limit the overall amount of generated bytes via `test_copy_bytes`.
> > 
> > This test setup is extremely expensive, as `test_copy_bytes` is
> > implemented via `dd ibs=1 count="$1"`, which copies data one byte at a
> > time. So as we write 1GB of data, we end up doing 1 billion reads and
> > writes. This naturally takes a while: it takes 6 minutes on my system,
> > and around 40 minutes in some CI jobs!
> > 
> > We can do much better though, as genzeros already knows to handle an
> > optional limit of how much data it is supposed to write, which allows us
> > to remove the call to `test_copy_bytes`. Furthermore, it has already
> > been optimized to generate the data fast.
> > 
> > And indeed, doing this conversion drops the test execution to less than
> > a second on my machine, so that we can drop the EXPENSIVE prerequisite.
> 
> EXPENSIVE is not only about execution time, but about resources in
> general.  While the modified test finishes quite fast indeed, 'git
> apply' uses over 1GB of RSS.  Therefore, the EXPENSIVE prerequisite
> should be kept.

That's fair. It's questionable whether 1GB of RSS really is expensive nowadays anymore, but I don't mind reinstating the prerequisite.

Patrick
Jeff KingJul 3, 2026, 07:00 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)

On Fri, Jul 03, 2026 at 07:42:00AM +0200, Patrick Steinhardt wrote:
Show 11 quoted lines
> > It feels like test_copy_bytes should be able to do much better in
> > general. The obvious thing to reach for is "head -c", but the function
> > was originally added because that wasn't portable. The "-c" option is
> > not in POSIX, though the original comment claims IRIX was the problem,
> > so I wonder if "head -c" is de facto portable these days.
> 
> An alternative could be to implement a simple helper as part of our
> test-tool. But I doubt it's really worth it: almost all callers only
> want to copy a small number of bytes. The only exception seems to be
> t0021, where we copy up to 65kB. But that whole test suite still only
> takes ~3 seconds, so optimizing that feels like wasted time to me.
Yeah, you're probably right that it's not worth worrying too much about.
-Peff
Jeff KingJul 3, 2026, 07:00 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository

On Fri, Jul 03, 2026 at 07:42:07AM +0200, Patrick Steinhardt wrote:
Show 13 quoted lines
> > Hmm, I hoped this would drop the time to run t7900 with --long, but it
> > takes about 1m40s both before and after your patch (vs ~6s without
> > --long). Just looking at the script, I'd guess that it's because the
> > subsequent repacks are mostly incremental or geometric, so they don't
> > need to write the big pack.
> > 
> > Oh well. It still seems like an obvious improvement, though, both in
> > terms of peak disk usage and avoiding unwanted surprises when more tests
> > are added later.
> 
> Yeah, the commit message is a bit hand-wavy there indeed. I think the
> bigger argument here is that having a test that is marked as EXPENSIVE
> and that may influence subsequent tests is just a bad idea.
Yes, very much agreed.
-Peff
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 0/9] t: fixes and improvements for GIT_TEST_LONG

Hi,

this series started out as a simple two-patch series that wired up the GitLab CI badge in our README and GIT_TEST_LONG for GitLab CI. But as it typically goes, tests broke on GitLab CI, which made me realize that they are broken even on GitHub's master branch right now. Some tests are failing in the linux32 job, and we only didn't notice because the whole pipeline hangs.

So I had to go down the rabbit hole a bit, the result of which is this patch series.

Changes in v2:
  - Reinstate the EXPENSIVE prerequisite on t4141, as we still end up
    reading 1GB of data into memory.
  - Improve a rather hand-wavy commit message.
  - Link to v1: https://patch.msgid.link/20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im
Thanks!
Patrick
[1]: <akIfsaVMB_S6kfJQ@pks.im>
---
Patrick Steinhardt (9):
      README: add GitLab CI badge to make it more discoverable
      t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
      t4141: fix inefficient use of dd(1)
      t5608: reduce maximum disk usage
      t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
      t7900: clean up large EXPENSIVE repository
      t: use `test_bool_env` to parse GIT_TEST_LONG
      gitlab-ci: disable RAM disk on macOS jobs
      gitlab-ci: enable "GIT_TEST_LONG"
 .gitlab-ci.yml             | 13 ++++-----
 README.md                  |  3 ++-
 ci/lib.sh                  | 12 +++++++--
 t/t0021-conversion.sh      |  2 +-
 t/t4141-apply-too-large.sh |  5 ++--
 t/t5608-clone-2gb.sh       | 66 ++++++++++++++++++++++++----------------------
 t/t7508-status.sh          |  2 +-
 t/t7900-maintenance.sh     | 56 +++++++++++++++++++++------------------
 t/test-lib.sh              |  4 +--
 9 files changed, 91 insertions(+), 72 deletions(-)
Range-diff versus v1:
 1:  1f445b2106 =  1:  a348e70b40 README: add GitLab CI badge to make it more discoverable
 2:  f2d21ef6f7 =  2:  c7444bddf3 t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
 3:  656d6b9ada !  3:  aea7f61bbb t4141: fix inefficient use of dd(1)
    @@ Commit message
         been optimized to generate the data fast.
     
         And indeed, doing this conversion drops the test execution to less than
    -    a second on my machine, so that we can drop the EXPENSIVE prerequisite.
    +    a second on my machine. That means that in theory it becomes feasible to
    +    drop the EXPENSIVE prerequisite now. But git-apply(1) still soaks up 1GB
    +    of data into memory, which may count as being expensive. Consequently,
    +    we keep the prerequisite intact.
     
         Signed-off-by: Patrick Steinhardt <ps@pks.im>
     
      ## t/t4141-apply-too-large.sh ##
     @@ t/t4141-apply-too-large.sh: test_description='git apply with too-large patch'
    - 
      . ./test-lib.sh
      
    --test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
    + test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
     -	sz=$((1024 * 1024 * 1023)) &&
    -+test_expect_success 'git apply rejects patches that are too large' '
      	{
      		cat <<-\EOF &&
      		diff --git a/file b/file
 4:  91ea8610ad =  4:  30b618259e t5608: reduce maximum disk usage
 5:  5d1f630617 =  5:  23898a60be t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT
 6:  4938e39e47 !  6:  835fa0f8e1 t7900: clean up large EXPENSIVE repository
    @@ Commit message
         One of the tests in t7900 is marked with EXPENSIVE because we create a
         repository with 2GB of data that we end up repacking. We never clean up
         that repository though, so we occupy the full 2GB of data until the end
    -    of the test suite. Besides clogging our disk, it also means that all
    -    subsequent tests may have to repack this data multiple times.
    +    of the test suite.
    +
    +    Besides clogging our disk, having an EXPENSIVE test that alters the
    +    repository's state used by subsequent tests is also a bad idea, as it
    +    can easily have an impact on the heuristics used by other maintenance
    +    tasks.
     
         Adapt the test so that we create the data in a standalone repository
         that we clean up at the end of the test. While at it, also disable
 7:  3a19541964 =  7:  13fa3db8cd t: use `test_bool_env` to parse GIT_TEST_LONG
 8:  7d33694504 =  8:  d8f94cb564 gitlab-ci: disable RAM disk on macOS jobs
 9:  56c0239056 =  9:  d4792b76a0 gitlab-ci: enable "GIT_TEST_LONG"

--- base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc change-id: 20260701-b4-pks-t-fixes-for-GIT-TEST-LONG-78e538bf0e06

Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 1/9] README: add GitLab CI badge to make it more discoverable

The Git project uses CI systems from both GitHub and GitLab. While both of these systems are extensively used in day-to-day work, we only have a link to the GitHub Workflows in our README, which makes the GitLab CI hard to discover.

Improve the situation by adding a second badge for GitLab CI to our README.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to README.md +2 −1
diff --git a/README.md b/README.md
index d87bca1b8c..46489b0971 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-[![Build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
+[![GitHub build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
+[![GitLab build status](https://gitlab.com/git-scm/git/badges/master/pipeline.svg)](https://gitlab.com/git-scm/git/-/pipelines?ref=master)
 
 Git - fast, scalable, distributed revision control system
 =========================================================
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

One of the tests in t0021 writes a 2GB file and then roundtrips it through the clean/sumdge filters. This test is broken on 32 bit platforms because they typically don't handle files larger then `SSIZE_MAX` well at all.

While our CI has a "linux32" job that should in theory hit this issue, we never noticed it because we didn't use to run EXPENSIVE tests until 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08). And after that commit, the test does not fail but instead hangs completely.

Ideally, we'd of course properly detect this situation and then test for it. In practice, this turns out to be hard as the test failure are not reliable as they often (but not always) run into ENOMEM errors.

Instead, skip the test altogether.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t0021-conversion.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t0021-conversion.sh +1 −1
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 033b00a364..7b9a0ca877 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -296,7 +296,7 @@ test_expect_success 'filter that does not read is fine' '
 	test_cmp expect actual
 '
 
-test_expect_success EXPENSIVE 'filter large file' '
+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '
 	test_config filter.largefile.smudge cat &&
 	test_config filter.largefile.clean cat &&
 	test_seq -f "%1048576d" 1 2048 >2GB &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 3/9] t4141: fix inefficient use of dd(1)

In t4141 we generate a patch that is roughly 1GB in size to verify that git-apply(1) indeed rejects that patch. We generate that patch by prepending a patch header and then executing `test-tool genzeros` without a limit. This causes us to print infinitely many zeros, and we limit the overall amount of generated bytes via `test_copy_bytes`.

This test setup is extremely expensive, as `test_copy_bytes` is implemented via `dd ibs=1 count="$1"`, which copies data one byte at a time. So as we write 1GB of data, we end up doing 1 billion reads and writes. This naturally takes a while: it takes 6 minutes on my system, and around 40 minutes in some CI jobs!

We can do much better though, as genzeros already knows to handle an optional limit of how much data it is supposed to write, which allows us to remove the call to `test_copy_bytes`. Furthermore, it has already been optimized to generate the data fast.

And indeed, doing this conversion drops the test execution to less than a second on my machine. That means that in theory it becomes feasible to drop the EXPENSIVE prerequisite now. But git-apply(1) still soaks up 1GB of data into memory, which may count as being expensive. Consequently, we keep the prerequisite intact.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t4141-apply-too-large.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Show changes to t/t4141-apply-too-large.sh +2 −3
diff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh
index eac6f7e151..9dbed940db 100755
--- a/t/t4141-apply-too-large.sh
+++ b/t/t4141-apply-too-large.sh
@@ -5,7 +5,6 @@ test_description='git apply with too-large patch'
 . ./test-lib.sh
 
 test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
-	sz=$((1024 * 1024 * 1023)) &&
 	{
 		cat <<-\EOF &&
 		diff --git a/file b/file
@@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '
 		+++ b/file
 		@@ -0,0 +1 @@
 		EOF
-		test-tool genzeros
-	} | test_copy_bytes $sz | test_must_fail git apply 2>err &&
+		test-tool genzeros $((1024 * 1024 * 1023))
+	} | test_must_fail git apply 2>err &&
 	grep "patch too large" err
 '
 
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 4/9] t5608: reduce maximum disk usage

The tests in t5608 perform a couple of clones of repositories that are somewhat large. Ultimately, we end up creating:

  - A setup repository that contains 2GB of uncompressed pack data.
  - A bare clone that contains the same 2GB of data.
  - A clone with worktree writes a 2GB packfile and a 2GB worktree.
  - A second setup repository that contains a 4GB packfile.
  - Two 4GB clone of that repository.

Some of these clones ultimately hardlink files, which ensures that we at least don't end up with more than 20GB of data. But at the end of the test we still have around 16GB of data, which is only a tiny bit better.

Refactor the test to prune repositories after they have no use anymore. This reduced the peak disk usage of this test to 8GB.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t5608-clone-2gb.sh | 66 ++++++++++++++++++++++++++++------------------------
 1 file changed, 35 insertions(+), 31 deletions(-)
Show changes to t/t5608-clone-2gb.sh +35 −31
diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh
index 4f8a95ddda..5d56debf1c 100755
--- a/t/t5608-clone-2gb.sh
+++ b/t/t5608-clone-2gb.sh
@@ -10,45 +10,47 @@ then
 fi
 
 test_expect_success 'setup' '
-
-	git config pack.compression 0 &&
-	git config pack.depth 0 &&
-	blobsize=$((100*1024*1024)) &&
-	blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
-	i=1 &&
-	(while test $i -le $blobcount
-	 do
-		printf "Generating blob $i/$blobcount\r" >&2 &&
-		printf "blob\nmark :$i\ndata $blobsize\n" &&
-		#test-tool genrandom $i $blobsize &&
-		printf "%-${blobsize}s" $i &&
-		echo "M 100644 :$i $i" >> commit &&
-		i=$(($i+1)) ||
-		echo $? > exit-status
-	 done &&
-	 echo "commit refs/heads/main" &&
-	 echo "author A U Thor <author@email.com> 123456789 +0000" &&
-	 echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
-	 echo "data 5" &&
-	 echo ">2gb" &&
-	 cat commit) |
-	git fast-import --big-file-threshold=2 &&
-	test ! -f exit-status
-
+	git init 2gb-repo &&
+	(
+		cd 2gb-repo &&
+		git config pack.compression 0 &&
+		git config pack.depth 0 &&
+		blobsize=$((100*1024*1024)) &&
+		blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
+		i=1 &&
+		(while test $i -le $blobcount
+		 do
+			printf "Generating blob $i/$blobcount\r" >&2 &&
+			printf "blob\nmark :$i\ndata $blobsize\n" &&
+			#test-tool genrandom $i $blobsize &&
+			printf "%-${blobsize}s" $i &&
+			echo "M 100644 :$i $i" >> commit &&
+			i=$(($i+1)) ||
+			echo $? > exit-status
+		 done &&
+		 echo "commit refs/heads/main" &&
+		 echo "author A U Thor <author@email.com> 123456789 +0000" &&
+		 echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
+		 echo "data 5" &&
+		 echo ">2gb" &&
+		 cat commit) |
+		git fast-import --big-file-threshold=2 &&
+		test ! -f exit-status
+	)
 '
 
 test_expect_success 'clone - bare' '
-
-	git clone --bare --no-hardlinks . clone-bare
-
+	test_when_finished rm -rf clone-bare &&
+	git clone --bare --no-hardlinks 2gb-repo clone-bare
 '
 
 test_expect_success 'clone - with worktree, file:// protocol' '
-
-	git clone "file://$(pwd)" clone-wt
-
+	test_when_finished rm -rf clone-wt &&
+	git clone "file://$(pwd)/2gb-repo" clone-wt
 '
 
+rm -rf 2gb-repo 2>/dev/null
+
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '
 	large_blob_size=$((4*1024*1024*1024+1)) &&
 	git init --bare 4gb-repo &&
@@ -61,6 +63,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '
 '
 
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-objects' '
+	test_when_finished rm -rf 4gb-clone-unpack &&
 	# The synthesized pack has five objects, so a large unpack limit keeps
 	# fetch-pack on the unpack-objects path.
 	git -c fetch.unpackLimit=100 clone --bare \
@@ -77,6 +80,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-obje
 '
 
 test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone with >4GB object via index-pack' '
+	test_when_finished rm -rf 4gb-clone-index &&
 	# Force fetch-pack to hand the pack to index-pack instead.
 	git -c fetch.unpackLimit=1 clone --bare \
 		"file://$(pwd)/4gb-repo" 4gb-clone-index &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

One of the tests in t7508 is marked as EXPENSIVE because it ends up creating and adding files that are multiple gigabytes in size. This takes a while to complete, hence the EXPENSIVE prerequisite.

Besides being expensive though the test can only work on systems where `size_t` is at least 64 bit. This is because one of the created files is larger than 4GB, and because Git tracks object size via `size_t` it will eventually blow up.

This test has also been blowing up in the "linux32" CI job in GitHub Workflows since 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08). But that job doesn't only fail, it also hangs, and that has been concealing the failure.

Fix the issue by marking the test as requiring 64 bit `size_t`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t7508-status.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7508-status.sh +1 −1
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c2057bc94c..dfdd78b6fe 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1773,7 +1773,7 @@ test_expect_success 'slow status advice when core.untrackedCache true, and fsmon
 	)
 '
 
-test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '
+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '
 	(
 		mkdir large-file &&
 		cd large-file &&
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 6/9] t7900: clean up large EXPENSIVE repository

One of the tests in t7900 is marked with EXPENSIVE because we create a repository with 2GB of data that we end up repacking. We never clean up that repository though, so we occupy the full 2GB of data until the end of the test suite.

Besides clogging our disk, having an EXPENSIVE test that alters the repository's state used by subsequent tests is also a bad idea, as it can easily have an impact on the heuristics used by other maintenance tasks.

Adapt the test so that we create the data in a standalone repository that we clean up at the end of the test. While at it, also disable auto-maintenance so that it does not race with our manual maintenance.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t7900-maintenance.sh | 56 ++++++++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 25 deletions(-)
Show changes to t/t7900-maintenance.sh +31 −25
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index d7f82e1bec..8a7e1306d0 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -461,36 +461,42 @@ test_expect_success 'incremental-repack task' '
 '
 
 test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
-	test_config core.compression 0 &&
+	test_when_finished rm -rf expensive-repo &&
+	git init expensive-repo &&
+	(
+		cd expensive-repo &&
+		git config set core.compression 0 &&
+		git config set maintenance.auto false &&
 
-	for i in $(test_seq 1 5)
-	do
-		test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
-		return 1
-	done &&
-	git add big &&
-	git commit -qm "Add big file (1)" &&
+		for i in $(test_seq 1 5)
+		do
+			test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+			return 1
+		done &&
+		git add big &&
+		git commit -qm "Add big file (1)" &&
 
-	# ensure any possible loose objects are in a pack-file
-	git maintenance run --task=loose-objects &&
+		# ensure any possible loose objects are in a pack-file
+		git maintenance run --task=loose-objects &&
 
-	rm big &&
-	for i in $(test_seq 6 10)
-	do
-		test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
-		return 1
-	done &&
-	git add big &&
-	git commit -qm "Add big file (2)" &&
+		rm big &&
+		for i in $(test_seq 6 10)
+		do
+			test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
+			return 1
+		done &&
+		git add big &&
+		git commit -qm "Add big file (2)" &&
 
-	# ensure any possible loose objects are in a pack-file
-	git maintenance run --task=loose-objects &&
+		# ensure any possible loose objects are in a pack-file
+		git maintenance run --task=loose-objects &&
 
-	# Now run the incremental-repack task and check the batch-size
-	GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
-		--task=incremental-repack 2>/dev/null &&
-	test_subcommand git multi-pack-index repack \
-		 --no-progress --batch-size=2147483647 <run-2g.txt
+		# Now run the incremental-repack task and check the batch-size
+		GIT_TRACE2_EVENT="$(pwd)/run-2g.txt" git maintenance run \
+			--task=incremental-repack 2>/dev/null &&
+		test_subcommand git multi-pack-index repack \
+			--no-progress --batch-size=2147483647 <run-2g.txt
+	)
 '
 
 run_incremental_repack_and_verify () {
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 7/9] t: use `test_bool_env` to parse GIT_TEST_LONG

It's currently hard to explicitly disable GIT_TEST_LONG by setting it to `false`. Fix this by using `test_bool_env` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/lib.sh     | 2 +-
 t/test-lib.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Show changes to 2 files +3 −3

ci/lib.sh, t/test-lib.sh

diff --git a/ci/lib.sh b/ci/lib.sh
index b939110a6e..01a0bc6b75 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -321,7 +321,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable the long tests for pushes to the integration branches as well.
 case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-	export GIT_TEST_LONG=YesPlease
+	export GIT_TEST_LONG=true
 	;;
 esac
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ceefb99bff..623fcfb747 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -210,7 +210,7 @@ parse_option () {
 	-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
 		immediate=t ;;
 	-l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
-		GIT_TEST_LONG=t; export GIT_TEST_LONG ;;
+		GIT_TEST_LONG=true; export GIT_TEST_LONG ;;
 	-r)
 		mark_option_requires_arg "$opt" run_list
 		;;
@@ -1849,7 +1849,7 @@ test_lazy_prereq AUTOIDENT '
 '
 
 test_lazy_prereq EXPENSIVE '
-	test -n "$GIT_TEST_LONG"
+	test_bool_env GIT_TEST_LONG false
 '
 
 test_lazy_prereq EXPENSIVE_ON_WINDOWS '
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 8/9] gitlab-ci: disable RAM disk on macOS jobs

When we added the macOS jobs to GitLab CI in 56090a35ab (ci: add macOS jobs to GitLab CI, 2024-01-18) we had to work around some very slow disks. This workaround essentially creates a RAM disk that we mount, where all test data is being written into RAM instead of the real disk.

In the next commit though we're about to enable "GIT_TEST_LONG", which will make tests run that are marked with the "EXPENSIVE" prerequisite. This change will make a couple of tests run that write up to 8GB of data into the test output directory. As our RAM disk is only 4GB in size, this change will cause ENOSPC errors.

We could accommodate for this by increasing the size of the RAM disk. In c9d708b7fc (gitlab-ci: upgrade macOS runners, 2026-05-21) we have upgraded our runners to use the "large" runners, which have 16GB of RAM available. So we could easily expand the RAM disk to a capacity of for example 12GB. But some test runs have shown that this is still quite flaky overall, as we get quite close to our limits.

Instead, drop the workaround completely. This does indeed slow down execution of the test jobs:

  - osx-clang goes from 18 minutes to 25 minutes
  - osx-meson goes from 21 minutes to 33 minutes
  - osx-reftable stays at 21 minutes

The last one seems like an outlier. The only explanation that I have is that we end up writing significantly less files with the reftable backend, which ultimately causes less I/O.

Overall though, it's preferable to have something that works with the least amount of flakiness compared to having something else that is faster but unstable. Despite that, the macOS jobs aren't even the slowest jobs, so this doesn't extend the overall pipeline's length.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .gitlab-ci.yml | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
Show changes to .gitlab-ci.yml +1 −6
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a8e90932c..a4aebe8b71 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -88,13 +88,8 @@ test:osx:
   tags:
     - saas-macos-large-m2pro
   variables:
-    TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
+    TEST_OUTPUT_DIRECTORY: "/tmp/test-output"
   before_script:
-    # Create a 4GB RAM disk that we use to store test output on. This small hack
-    # significantly speeds up tests by more than a factor of 2 because the
-    # macOS runners use network-attached storage as disks, which is _really_
-    # slow with the many small writes that our tests do.
-    - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
     - ./ci/install-dependencies.sh
   script:
     - ./ci/run-build-and-tests.sh
-- 
2.55.0.795.g602f6c329a.dirty
Patrick SteinhardtJul 3, 2026, 09:24 UTC in reply to Patrick Steinhardt on lore

[PATCH v2 9/9] gitlab-ci: enable "GIT_TEST_LONG"

Starting with 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08) we run expensive tests in our CI for certain events. So far, this has only been wired up for GitHub Workflows though, which creates a test gap for GitLab CI.

Plug this gap by also making this work for the latter.

Note that these tests cannot be run on the Windows runners, as they only have 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests, so we explicitly disable "GIT_TEST_LONG" on these jobs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .gitlab-ci.yml |  6 ++++++
 ci/lib.sh      | 12 ++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
Show changes to 2 files +16 −2

.gitlab-ci.yml, ci/lib.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4aebe8b71..1c4d04da9d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,6 +147,9 @@ test:mingw64:
   needs:
     - job: "build:mingw64"
       artifacts: true
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   before_script:
     - *windows_before_script
     - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
@@ -195,6 +198,9 @@ test:msvc-meson:
   script:
     - |
       & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   after_script:
     - |
       if ($env:CI_JOB_STATUS -ne "success") {
diff --git a/ci/lib.sh b/ci/lib.sh
index 01a0bc6b75..6c52154eac 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -215,6 +215,7 @@ then
 	test macos != "$CI_OS_NAME" || CI_OS_NAME=osx
 	CI_REPO_SLUG="$GITHUB_REPOSITORY"
 	CI_JOB_ID="$GITHUB_RUN_ID"
+	CI_EVENT="$GITHUB_EVENT_NAME"
 	CC="${CC_PACKAGE:-${CC:-gcc}}"
 	DONT_SKIP_TAGS=t
 	handle_failed_tests () {
@@ -239,6 +240,13 @@ then
 	CI_BRANCH="$CI_COMMIT_REF_NAME"
 	CI_COMMIT="$CI_COMMIT_SHA"
 
+	case "$CI_PIPELINE_SOURCE" in
+	merge_request_event)
+		CI_EVENT=pull_request;;
+	*)
+		CI_EVENT="$CI_PIPELINE_SOURCE";;
+	esac
+
 	case "$OS,$CI_JOB_IMAGE" in
 	Windows_NT,*)
 		CI_OS_NAME=windows
@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable "expensive" tests for PR events.
 # In order to catch bugs introduced at integration time by mismerges,
 # enable the long tests for pushes to the integration branches as well.
-case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
+case "$CI_EVENT,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-	export GIT_TEST_LONG=true
+	export GIT_TEST_LONG=${GIT_TEST_LONG:-true}
 	;;
 esac
 
-- 
2.55.0.795.g602f6c329a.dirty
Junio C HamanoJul 3, 2026, 17:36 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

Patrick Steinhardt <ps@pks.im> writes:

The subject reads "skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT", but we need to add prerequisite for 64BIT, wouldn't it be more accurate to say without SIZE_T_IS_64BIT?

That is, the test is broken with SIZE_T_IS_32BIT, no?
Show 6 quoted lines
> ...
> -test_expect_success EXPENSIVE 'filter large file' '
> +test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '
>  	test_config filter.largefile.smudge cat &&
>  	test_config filter.largefile.clean cat &&
>  	test_seq -f "%1048576d" 1 2048 >2GB &&
Junio C HamanoJul 3, 2026, 17:38 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH v2 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

Patrick Steinhardt <ps@pks.im> writes:

The same comment as [2/9] about 32 vs 64 in the subject "skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT" applies here, I think.

Show 6 quoted lines
> ...
> -test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '
> +test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '
>  	(
>  		mkdir large-file &&
>  		cd large-file &&
Patrick SteinhardtJul 6, 2026, 06:23 UTC in reply to Junio C Hamano on lore

Re: [PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT

On Fri, Jul 03, 2026 at 10:36:52AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> The subject reads "skip EXPENSIVE test that is broken without
> SIZE_T_IS_32BIT", but we need to add prerequisite for 64BIT,
> wouldn't it be more accurate to say without SIZE_T_IS_64BIT?
> 
> That is, the test is broken with SIZE_T_IS_32BIT, no?

Ugh, it should either be "with SIZE_T_IS_32BIT" (which doesn't even exist as a prereq) or "without SIZE_T_IS_64BIT". Will fix, thanks for noticing!

Patrick

Back to recent threads