{"thread":{"id":"65912","subject":"[PATCH 0/9] t: fixes and improvements for GIT_TEST_LONG","startedAt":"2026-07-02T12:01:06Z","lastAt":"2026-07-06T06:23:58Z","messageCount":33,"participants":["Patrick Steinhardt","SZEDER Gábor","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"546978","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":null,"subject":"[PATCH 0/9] t: fixes and improvements for GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:53Z","receivedAt":"2026-07-02T12:01:06Z","isPatch":true,"body":"Hi,\n\nthis series started out as a simple two-patch series that wired up the\nGitLab CI badge in our README and GIT_TEST_LONG for GitLab CI. But as it\ntypically goes, tests broke on GitLab CI, which made me realize that\nthey are broken even on GitHub's master branch right now. Some tests are\nfailing in the linux32 job, and we only didn't notice because the whole\npipeline hangs.\n\nSo I had to go down the rabbit hole a bit, the result of which is this\npatch series.\n\nThanks!\n\nPatrick\n\n[1]: <akIfsaVMB_S6kfJQ@pks.im>\n\n---\nPatrick Steinhardt (9):\n      README: add GitLab CI badge to make it more discoverable\n      t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n      t4141: fix inefficient use of dd(1)\n      t5608: reduce maximum disk usage\n      t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n      t7900: clean up large EXPENSIVE repository\n      t: use `test_bool_env` to parse GIT_TEST_LONG\n      gitlab-ci: disable RAM disk on macOS jobs\n      gitlab-ci: enable \"GIT_TEST_LONG\"\n\n .gitlab-ci.yml             | 13 ++++-----\n README.md                  |  3 ++-\n ci/lib.sh                  | 12 +++++++--\n t/t0021-conversion.sh      |  2 +-\n t/t4141-apply-too-large.sh |  7 +++--\n t/t5608-clone-2gb.sh       | 66 ++++++++++++++++++++++++----------------------\n t/t7508-status.sh          |  2 +-\n t/t7900-maintenance.sh     | 56 +++++++++++++++++++++------------------\n t/test-lib.sh              |  4 +--\n 9 files changed, 92 insertions(+), 73 deletions(-)\n\n\n---\nbase-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\nchange-id: 20260701-b4-pks-t-fixes-for-GIT-TEST-LONG-78e538bf0e06\n\n"},{"id":"546979","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-1-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 1/9] README: add GitLab CI badge to make it more discoverable","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:54Z","receivedAt":"2026-07-02T12:01:07Z","isPatch":true,"body":"The Git project uses CI systems from both GitHub and GitLab. While both\nof these systems are extensively used in day-to-day work, we only have a\nlink to the GitHub Workflows in our README, which makes the GitLab CI\nhard to discover.\n\nImprove the situation by adding a second badge for GitLab CI to our\nREADME.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n README.md | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/README.md b/README.md\nindex d87bca1b8c..46489b0971 100644\n--- a/README.md\n+++ b/README.md\n@@ -1,4 +1,5 @@\n-[![Build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)\n+[![GitHub build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)\n+[![GitLab build status](https://gitlab.com/git-scm/git/badges/master/pipeline.svg)](https://gitlab.com/git-scm/git/-/pipelines?ref=master)\n \n Git - fast, scalable, distributed revision control system\n =========================================================\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546980","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-2-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:55Z","receivedAt":"2026-07-02T12:01:10Z","isPatch":true,"body":"One of the tests in t0021 writes a 2GB file and then roundtrips it\nthrough the clean/sumdge filters. This test is broken on 32 bit\nplatforms because they typically don't handle files larger then\n`SSIZE_MAX` well at all.\n\nWhile our CI has a \"linux32\" job that should in theory hit this issue,\nwe never noticed it because we didn't use to run EXPENSIVE tests until\n7a094d68a2 (ci: run expensive tests on push builds to integration\nbranches, 2026-05-08). And after that commit, the test does not fail but\ninstead hangs completely.\n\nIdeally, we'd of course properly detect this situation and then test for\nit. In practice, this turns out to be hard as the test failure are not\nreliable as they often (but not always) run into ENOMEM errors.\n\nInstead, skip the test altogether.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0021-conversion.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex 033b00a364..7b9a0ca877 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -296,7 +296,7 @@ test_expect_success 'filter that does not read is fine' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success EXPENSIVE 'filter large file' '\n+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '\n \ttest_config filter.largefile.smudge cat &&\n \ttest_config filter.largefile.clean cat &&\n \ttest_seq -f \"%1048576d\" 1 2048 >2GB &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546981","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-3-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:56Z","receivedAt":"2026-07-02T12:01:13Z","isPatch":true,"body":"In t4141 we generate a patch that is roughly 1GB in size to verify that\ngit-apply(1) indeed rejects that patch. We generate that patch by\nprepending a patch header and then executing `test-tool genzeros`\nwithout a limit. This causes us to print infinitely many zeros, and we\nlimit the overall amount of generated bytes via `test_copy_bytes`.\n\nThis test setup is extremely expensive, as `test_copy_bytes` is\nimplemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\ntime. So as we write 1GB of data, we end up doing 1 billion reads and\nwrites. This naturally takes a while: it takes 6 minutes on my system,\nand around 40 minutes in some CI jobs!\n\nWe can do much better though, as genzeros already knows to handle an\noptional limit of how much data it is supposed to write, which allows us\nto remove the call to `test_copy_bytes`. Furthermore, it has already\nbeen optimized to generate the data fast.\n\nAnd indeed, doing this conversion drops the test execution to less than\na second on my machine, so that we can drop the EXPENSIVE prerequisite.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t4141-apply-too-large.sh | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh\nindex eac6f7e151..dad67779ed 100755\n--- a/t/t4141-apply-too-large.sh\n+++ b/t/t4141-apply-too-large.sh\n@@ -4,8 +4,7 @@ test_description='git apply with too-large patch'\n \n . ./test-lib.sh\n \n-test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n-\tsz=$((1024 * 1024 * 1023)) &&\n+test_expect_success 'git apply rejects patches that are too large' '\n \t{\n \t\tcat <<-\\EOF &&\n \t\tdiff --git a/file b/file\n@@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n \t\t+++ b/file\n \t\t@@ -0,0 +1 @@\n \t\tEOF\n-\t\ttest-tool genzeros\n-\t} | test_copy_bytes $sz | test_must_fail git apply 2>err &&\n+\t\ttest-tool genzeros $((1024 * 1024 * 1023))\n+\t} | test_must_fail git apply 2>err &&\n \tgrep \"patch too large\" err\n '\n \n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546982","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-4-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 4/9] t5608: reduce maximum disk usage","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:57Z","receivedAt":"2026-07-02T12:01:15Z","isPatch":true,"body":"The tests in t5608 perform a couple of clones of repositories that are\nsomewhat large. Ultimately, we end up creating:\n\n  - A setup repository that contains 2GB of uncompressed pack data.\n\n  - A bare clone that contains the same 2GB of data.\n\n  - A clone with worktree writes a 2GB packfile and a 2GB worktree.\n\n  - A second setup repository that contains a 4GB packfile.\n\n  - Two 4GB clone of that repository.\n\nSome of these clones ultimately hardlink files, which ensures that we at\nleast don't end up with more than 20GB of data. But at the end of the\ntest we still have around 16GB of data, which is only a tiny bit better.\n\nRefactor the test to prune repositories after they have no use anymore.\nThis reduced the peak disk usage of this test to 8GB.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t5608-clone-2gb.sh | 66 ++++++++++++++++++++++++++++------------------------\n 1 file changed, 35 insertions(+), 31 deletions(-)\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex 4f8a95ddda..5d56debf1c 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -10,45 +10,47 @@ then\n fi\n \n test_expect_success 'setup' '\n-\n-\tgit config pack.compression 0 &&\n-\tgit config pack.depth 0 &&\n-\tblobsize=$((100*1024*1024)) &&\n-\tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n-\ti=1 &&\n-\t(while test $i -le $blobcount\n-\t do\n-\t\tprintf \"Generating blob $i/$blobcount\\r\" >&2 &&\n-\t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n-\t\t#test-tool genrandom $i $blobsize &&\n-\t\tprintf \"%-${blobsize}s\" $i &&\n-\t\techo \"M 100644 :$i $i\" >> commit &&\n-\t\ti=$(($i+1)) ||\n-\t\techo $? > exit-status\n-\t done &&\n-\t echo \"commit refs/heads/main\" &&\n-\t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n-\t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n-\t echo \"data 5\" &&\n-\t echo \">2gb\" &&\n-\t cat commit) |\n-\tgit fast-import --big-file-threshold=2 &&\n-\ttest ! -f exit-status\n-\n+\tgit init 2gb-repo &&\n+\t(\n+\t\tcd 2gb-repo &&\n+\t\tgit config pack.compression 0 &&\n+\t\tgit config pack.depth 0 &&\n+\t\tblobsize=$((100*1024*1024)) &&\n+\t\tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n+\t\ti=1 &&\n+\t\t(while test $i -le $blobcount\n+\t\t do\n+\t\t\tprintf \"Generating blob $i/$blobcount\\r\" >&2 &&\n+\t\t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n+\t\t\t#test-tool genrandom $i $blobsize &&\n+\t\t\tprintf \"%-${blobsize}s\" $i &&\n+\t\t\techo \"M 100644 :$i $i\" >> commit &&\n+\t\t\ti=$(($i+1)) ||\n+\t\t\techo $? > exit-status\n+\t\t done &&\n+\t\t echo \"commit refs/heads/main\" &&\n+\t\t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n+\t\t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n+\t\t echo \"data 5\" &&\n+\t\t echo \">2gb\" &&\n+\t\t cat commit) |\n+\t\tgit fast-import --big-file-threshold=2 &&\n+\t\ttest ! -f exit-status\n+\t)\n '\n \n test_expect_success 'clone - bare' '\n-\n-\tgit clone --bare --no-hardlinks . clone-bare\n-\n+\ttest_when_finished rm -rf clone-bare &&\n+\tgit clone --bare --no-hardlinks 2gb-repo clone-bare\n '\n \n test_expect_success 'clone - with worktree, file:// protocol' '\n-\n-\tgit clone \"file://$(pwd)\" clone-wt\n-\n+\ttest_when_finished rm -rf clone-wt &&\n+\tgit clone \"file://$(pwd)/2gb-repo\" clone-wt\n '\n \n+rm -rf 2gb-repo 2>/dev/null\n+\n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '\n \tlarge_blob_size=$((4*1024*1024*1024+1)) &&\n \tgit init --bare 4gb-repo &&\n@@ -61,6 +63,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '\n '\n \n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-objects' '\n+\ttest_when_finished rm -rf 4gb-clone-unpack &&\n \t# The synthesized pack has five objects, so a large unpack limit keeps\n \t# fetch-pack on the unpack-objects path.\n \tgit -c fetch.unpackLimit=100 clone --bare \\\n@@ -77,6 +80,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-obje\n '\n \n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone with >4GB object via index-pack' '\n+\ttest_when_finished rm -rf 4gb-clone-index &&\n \t# Force fetch-pack to hand the pack to index-pack instead.\n \tgit -c fetch.unpackLimit=1 clone --bare \\\n \t\t\"file://$(pwd)/4gb-repo\" 4gb-clone-index &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546983","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-5-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:58Z","receivedAt":"2026-07-02T12:01:18Z","isPatch":true,"body":"One of the tests in t7508 is marked as EXPENSIVE because it ends up\ncreating and adding files that are multiple gigabytes in size. This\ntakes a while to complete, hence the EXPENSIVE prerequisite.\n\nBesides being expensive though the test can only work on systems where\n`size_t` is at least 64 bit. This is because one of the created files\nis larger than 4GB, and because Git tracks object size via `size_t` it\nwill eventually blow up.\n\nThis test has also been blowing up in the \"linux32\" CI job in GitHub\nWorkflows since 7a094d68a2 (ci: run expensive tests on push builds to\nintegration branches, 2026-05-08). But that job doesn't only fail, it\nalso hangs, and that has been concealing the failure.\n\nFix the issue by marking the test as requiring 64 bit `size_t`.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7508-status.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex c2057bc94c..dfdd78b6fe 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -1773,7 +1773,7 @@ test_expect_success 'slow status advice when core.untrackedCache true, and fsmon\n \t)\n '\n \n-test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '\n+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '\n \t(\n \t\tmkdir large-file &&\n \t\tcd large-file &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546984","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-6-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:00:59Z","receivedAt":"2026-07-02T12:01:21Z","isPatch":true,"body":"One of the tests in t7900 is marked with EXPENSIVE because we create a\nrepository with 2GB of data that we end up repacking. We never clean up\nthat repository though, so we occupy the full 2GB of data until the end\nof the test suite. Besides clogging our disk, it also means that all\nsubsequent tests may have to repack this data multiple times.\n\nAdapt the test so that we create the data in a standalone repository\nthat we clean up at the end of the test. While at it, also disable\nauto-maintenance so that it does not race with our manual maintenance.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7900-maintenance.sh | 56 ++++++++++++++++++++++++++++----------------------\n 1 file changed, 31 insertions(+), 25 deletions(-)\n\ndiff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh\nindex d7f82e1bec..8a7e1306d0 100755\n--- a/t/t7900-maintenance.sh\n+++ b/t/t7900-maintenance.sh\n@@ -461,36 +461,42 @@ test_expect_success 'incremental-repack task' '\n '\n \n test_expect_success EXPENSIVE 'incremental-repack 2g limit' '\n-\ttest_config core.compression 0 &&\n+\ttest_when_finished rm -rf expensive-repo &&\n+\tgit init expensive-repo &&\n+\t(\n+\t\tcd expensive-repo &&\n+\t\tgit config set core.compression 0 &&\n+\t\tgit config set maintenance.auto false &&\n \n-\tfor i in $(test_seq 1 5)\n-\tdo\n-\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n-\t\treturn 1\n-\tdone &&\n-\tgit add big &&\n-\tgit commit -qm \"Add big file (1)\" &&\n+\t\tfor i in $(test_seq 1 5)\n+\t\tdo\n+\t\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n+\t\t\treturn 1\n+\t\tdone &&\n+\t\tgit add big &&\n+\t\tgit commit -qm \"Add big file (1)\" &&\n \n-\t# ensure any possible loose objects are in a pack-file\n-\tgit maintenance run --task=loose-objects &&\n+\t\t# ensure any possible loose objects are in a pack-file\n+\t\tgit maintenance run --task=loose-objects &&\n \n-\trm big &&\n-\tfor i in $(test_seq 6 10)\n-\tdo\n-\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n-\t\treturn 1\n-\tdone &&\n-\tgit add big &&\n-\tgit commit -qm \"Add big file (2)\" &&\n+\t\trm big &&\n+\t\tfor i in $(test_seq 6 10)\n+\t\tdo\n+\t\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n+\t\t\treturn 1\n+\t\tdone &&\n+\t\tgit add big &&\n+\t\tgit commit -qm \"Add big file (2)\" &&\n \n-\t# ensure any possible loose objects are in a pack-file\n-\tgit maintenance run --task=loose-objects &&\n+\t\t# ensure any possible loose objects are in a pack-file\n+\t\tgit maintenance run --task=loose-objects &&\n \n-\t# Now run the incremental-repack task and check the batch-size\n-\tGIT_TRACE2_EVENT=\"$(pwd)/run-2g.txt\" git maintenance run \\\n-\t\t--task=incremental-repack 2>/dev/null &&\n-\ttest_subcommand git multi-pack-index repack \\\n-\t\t --no-progress --batch-size=2147483647 <run-2g.txt\n+\t\t# Now run the incremental-repack task and check the batch-size\n+\t\tGIT_TRACE2_EVENT=\"$(pwd)/run-2g.txt\" git maintenance run \\\n+\t\t\t--task=incremental-repack 2>/dev/null &&\n+\t\ttest_subcommand git multi-pack-index repack \\\n+\t\t\t--no-progress --batch-size=2147483647 <run-2g.txt\n+\t)\n '\n \n run_incremental_repack_and_verify () {\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546985","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-7-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 7/9] t: use `test_bool_env` to parse GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:01:00Z","receivedAt":"2026-07-02T12:01:23Z","isPatch":true,"body":"It's currently hard to explicitly disable GIT_TEST_LONG by setting it to\n`false`. Fix this by using `test_bool_env` instead.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/lib.sh     | 2 +-\n t/test-lib.sh | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex b939110a6e..01a0bc6b75 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -321,7 +321,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease\n # enable the long tests for pushes to the integration branches as well.\n case \"$GITHUB_EVENT_NAME,$CI_BRANCH\" in\n pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)\n-\texport GIT_TEST_LONG=YesPlease\n+\texport GIT_TEST_LONG=true\n \t;;\n esac\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ceefb99bff..623fcfb747 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -210,7 +210,7 @@ parse_option () {\n \t-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)\n \t\timmediate=t ;;\n \t-l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)\n-\t\tGIT_TEST_LONG=t; export GIT_TEST_LONG ;;\n+\t\tGIT_TEST_LONG=true; export GIT_TEST_LONG ;;\n \t-r)\n \t\tmark_option_requires_arg \"$opt\" run_list\n \t\t;;\n@@ -1849,7 +1849,7 @@ test_lazy_prereq AUTOIDENT '\n '\n \n test_lazy_prereq EXPENSIVE '\n-\ttest -n \"$GIT_TEST_LONG\"\n+\ttest_bool_env GIT_TEST_LONG false\n '\n \n test_lazy_prereq EXPENSIVE_ON_WINDOWS '\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546986","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-8-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 8/9] gitlab-ci: disable RAM disk on macOS jobs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:01:01Z","receivedAt":"2026-07-02T12:01:25Z","isPatch":true,"body":"When we added the macOS jobs to GitLab CI in 56090a35ab (ci: add macOS\njobs to GitLab CI, 2024-01-18) we had to work around some very slow\ndisks. This workaround essentially creates a RAM disk that we mount,\nwhere all test data is being written into RAM instead of the real disk.\n\nIn the next commit though we're about to enable \"GIT_TEST_LONG\", which\nwill make tests run that are marked with the \"EXPENSIVE\" prerequisite.\nThis change will make a couple of tests run that write up to 8GB of data\ninto the test output directory. As our RAM disk is only 4GB in size,\nthis change will cause ENOSPC errors.\n\nWe could accommodate for this by increasing the size of the RAM disk.\nIn c9d708b7fc (gitlab-ci: upgrade macOS runners, 2026-05-21) we have\nupgraded our runners to use the \"large\" runners, which have 16GB of RAM\navailable. So we could easily expand the RAM disk to a capacity of for\nexample 12GB. But some test runs have shown that this is still quite\nflaky overall, as we get quite close to our limits.\n\nInstead, drop the workaround completely. This does indeed slow down\nexecution of the test jobs:\n\n  - osx-clang goes from 18 minutes to 25 minutes\n\n  - osx-meson goes from 21 minutes to 33 minutes\n\n  - osx-reftable stays at 21 minutes\n\nThe last one seems like an outlier. The only explanation that I have is\nthat we end up writing significantly less files with the reftable\nbackend, which ultimately causes less I/O.\n\nOverall though, it's preferable to have something that works with the\nleast amount of flakiness compared to having something else that is\nfaster but unstable. Despite that, the macOS jobs aren't even the\nslowest jobs, so this doesn't extend the overall pipeline's length.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .gitlab-ci.yml | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex 1a8e90932c..a4aebe8b71 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -88,13 +88,8 @@ test:osx:\n   tags:\n     - saas-macos-large-m2pro\n   variables:\n-    TEST_OUTPUT_DIRECTORY: \"/Volumes/RAMDisk\"\n+    TEST_OUTPUT_DIRECTORY: \"/tmp/test-output\"\n   before_script:\n-    # Create a 4GB RAM disk that we use to store test output on. This small hack\n-    # significantly speeds up tests by more than a factor of 2 because the\n-    # macOS runners use network-attached storage as disks, which is _really_\n-    # slow with the many small writes that our tests do.\n-    - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk\n     - ./ci/install-dependencies.sh\n   script:\n     - ./ci/run-build-and-tests.sh\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"546987","messageId":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-9-76b4d7bab3d0@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH 9/9] gitlab-ci: enable \"GIT_TEST_LONG\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-02T12:01:02Z","receivedAt":"2026-07-02T12:01:28Z","isPatch":true,"body":"Starting with 7a094d68a2 (ci: run expensive tests on push builds to\nintegration branches, 2026-05-08) we run expensive tests in our CI for\ncertain events. So far, this has only been wired up for GitHub Workflows\nthough, which creates a test gap for GitLab CI.\n\nPlug this gap by also making this work for the latter.\n\nNote that these tests cannot be run on the Windows runners, as they only\nhave 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests,\nso we explicitly disable \"GIT_TEST_LONG\" on these jobs.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .gitlab-ci.yml |  6 ++++++\n ci/lib.sh      | 12 ++++++++++--\n 2 files changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex a4aebe8b71..1c4d04da9d 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -147,6 +147,9 @@ test:mingw64:\n   needs:\n     - job: \"build:mingw64\"\n       artifacts: true\n+  variables:\n+    # Windows runners don't have enough RAM to run EXPENSIVE tests.\n+    GIT_TEST_LONG: false\n   before_script:\n     - *windows_before_script\n     - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'\n@@ -195,6 +198,9 @@ test:msvc-meson:\n   script:\n     - |\n       & \"C:/Program Files/Git/usr/bin/bash.exe\" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'\n+  variables:\n+    # Windows runners don't have enough RAM to run EXPENSIVE tests.\n+    GIT_TEST_LONG: false\n   after_script:\n     - |\n       if ($env:CI_JOB_STATUS -ne \"success\") {\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 01a0bc6b75..6c52154eac 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -215,6 +215,7 @@ then\n \ttest macos != \"$CI_OS_NAME\" || CI_OS_NAME=osx\n \tCI_REPO_SLUG=\"$GITHUB_REPOSITORY\"\n \tCI_JOB_ID=\"$GITHUB_RUN_ID\"\n+\tCI_EVENT=\"$GITHUB_EVENT_NAME\"\n \tCC=\"${CC_PACKAGE:-${CC:-gcc}}\"\n \tDONT_SKIP_TAGS=t\n \thandle_failed_tests () {\n@@ -239,6 +240,13 @@ then\n \tCI_BRANCH=\"$CI_COMMIT_REF_NAME\"\n \tCI_COMMIT=\"$CI_COMMIT_SHA\"\n \n+\tcase \"$CI_PIPELINE_SOURCE\" in\n+\tmerge_request_event)\n+\t\tCI_EVENT=pull_request;;\n+\t*)\n+\t\tCI_EVENT=\"$CI_PIPELINE_SOURCE\";;\n+\tesac\n+\n \tcase \"$OS,$CI_JOB_IMAGE\" in\n \tWindows_NT,*)\n \t\tCI_OS_NAME=windows\n@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease\n # enable \"expensive\" tests for PR events.\n # In order to catch bugs introduced at integration time by mismerges,\n # enable the long tests for pushes to the integration branches as well.\n-case \"$GITHUB_EVENT_NAME,$CI_BRANCH\" in\n+case \"$CI_EVENT,$CI_BRANCH\" in\n pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)\n-\texport GIT_TEST_LONG=true\n+\texport GIT_TEST_LONG=${GIT_TEST_LONG:-true}\n \t;;\n esac\n \n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547002","messageId":"akakvnoAswZx+DNI@szeder.dev","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-3-76b4d7bab3d0@pks.im","subject":"Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2026-07-02T17:49:50Z","receivedAt":"2026-07-02T17:49:54Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:\n> In t4141 we generate a patch that is roughly 1GB in size to verify that\n> git-apply(1) indeed rejects that patch. We generate that patch by\n> prepending a patch header and then executing `test-tool genzeros`\n> without a limit. This causes us to print infinitely many zeros, and we\n> limit the overall amount of generated bytes via `test_copy_bytes`.\n> \n> This test setup is extremely expensive, as `test_copy_bytes` is\n> implemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\n> time. So as we write 1GB of data, we end up doing 1 billion reads and\n> writes. This naturally takes a while: it takes 6 minutes on my system,\n> and around 40 minutes in some CI jobs!\n> \n> We can do much better though, as genzeros already knows to handle an\n> optional limit of how much data it is supposed to write, which allows us\n> to remove the call to `test_copy_bytes`. Furthermore, it has already\n> been optimized to generate the data fast.\n> \n> And indeed, doing this conversion drops the test execution to less than\n> a second on my machine, so that we can drop the EXPENSIVE prerequisite.\n\nEXPENSIVE is not only about execution time, but about resources in\ngeneral.  While the modified test finishes quite fast indeed, 'git\napply' uses over 1GB of RSS.  Therefore, the EXPENSIVE prerequisite\nshould be kept.\n\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  t/t4141-apply-too-large.sh | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n> \n> diff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh\n> index eac6f7e151..dad67779ed 100755\n> --- a/t/t4141-apply-too-large.sh\n> +++ b/t/t4141-apply-too-large.sh\n> @@ -4,8 +4,7 @@ test_description='git apply with too-large patch'\n>  \n>  . ./test-lib.sh\n>  \n> -test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n> -\tsz=$((1024 * 1024 * 1023)) &&\n> +test_expect_success 'git apply rejects patches that are too large' '\n>  \t{\n>  \t\tcat <<-\\EOF &&\n>  \t\tdiff --git a/file b/file\n> @@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n>  \t\t+++ b/file\n>  \t\t@@ -0,0 +1 @@\n>  \t\tEOF\n> -\t\ttest-tool genzeros\n> -\t} | test_copy_bytes $sz | test_must_fail git apply 2>err &&\n> +\t\ttest-tool genzeros $((1024 * 1024 * 1023))\n> +\t} | test_must_fail git apply 2>err &&\n>  \tgrep \"patch too large\" err\n>  '\n>  \n> \n> -- \n> 2.55.0.795.g602f6c329a.dirty\n> \n"},{"id":"547011","messageId":"20260702211614.GB2051171@coredump.intra.peff.net","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-3-76b4d7bab3d0@pks.im","subject":"Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-02T21:16:14Z","receivedAt":"2026-07-02T21:16:16Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:\n\n> This test setup is extremely expensive, as `test_copy_bytes` is\n> implemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\n> time. So as we write 1GB of data, we end up doing 1 billion reads and\n> writes. This naturally takes a while: it takes 6 minutes on my system,\n> and around 40 minutes in some CI jobs!\n> \n> We can do much better though, as genzeros already knows to handle an\n> optional limit of how much data it is supposed to write, which allows us\n> to remove the call to `test_copy_bytes`. Furthermore, it has already\n> been optimized to generate the data fast.\n\nSeems like a good fix for this case, where we can skip the extra process\nentirely.\n\nIt feels like test_copy_bytes should be able to do much better in\ngeneral. The obvious thing to reach for is \"head -c\", but the function\nwas originally added because that wasn't portable. The \"-c\" option is\nnot in POSIX, though the original comment claims IRIX was the problem,\nso I wonder if \"head -c\" is de facto portable these days.\n\nI'd use perl of course. ;) The history here is somewhat amusing. We\noriginally did use dd, but that changed in 4de0bbd898 (t9300: use perl\n\"head -c\" clone in place of \"dd bs=1 count=16000\" kluge, 2010-12-13)\nbecause dd was slow. The code moved to test-lib.sh in 48860819e8 (t9300:\nfactor out portable \"head -c\" replacement, 2016-06-30), where I rejected\nthe dd solution because it was slow. And then the perl turned back into\ndd in 01486b5de8 (t: adapt `test_copy_bytes()` to not use Perl,\n2025-04-03), becoming slow again.\n\nChesterton's fence at work?\n\n-Peff\n"},{"id":"547012","messageId":"20260702212235.GC2051171@coredump.intra.peff.net","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-5-76b4d7bab3d0@pks.im","subject":"Re: [PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-02T21:22:35Z","receivedAt":"2026-07-02T21:22:36Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 02:00:58PM +0200, Patrick Steinhardt wrote:\n\n> This test has also been blowing up in the \"linux32\" CI job in GitHub\n> Workflows since 7a094d68a2 (ci: run expensive tests on push builds to\n> integration branches, 2026-05-08). But that job doesn't only fail, it\n> also hangs, and that has been concealing the failure.\n\nOne thing I don't understand about this and a few other patches in this\nseries: I've been getting passing GitHub Actions runs, including\nlinux32, even after that commit turned on the expensive jobs.\n\nFrom your description it sounds like it should _never_ work, but it does\nfor me. It's possible there's something going on in my CI builds that\nwould cause the expensive tests not to run, but I don't think so. Am I\nmisunderstanding the problem? Or is there something missing from the\nanalysis?\n\n-Peff\n"},{"id":"547013","messageId":"20260702213044.GD2051171@coredump.intra.peff.net","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-6-76b4d7bab3d0@pks.im","subject":"Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-02T21:30:44Z","receivedAt":"2026-07-02T21:30:46Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 02:00:59PM +0200, Patrick Steinhardt wrote:\n\n> One of the tests in t7900 is marked with EXPENSIVE because we create a\n> repository with 2GB of data that we end up repacking. We never clean up\n> that repository though, so we occupy the full 2GB of data until the end\n> of the test suite. Besides clogging our disk, it also means that all\n> subsequent tests may have to repack this data multiple times.\n\nHmm, I hoped this would drop the time to run t7900 with --long, but it\ntakes about 1m40s both before and after your patch (vs ~6s without\n--long). Just looking at the script, I'd guess that it's because the\nsubsequent repacks are mostly incremental or geometric, so they don't\nneed to write the big pack.\n\nOh well. It still seems like an obvious improvement, though, both in\nterms of peak disk usage and avoiding unwanted surprises when more tests\nare added later.\n\n-Peff\n"},{"id":"547014","messageId":"20260702221858.GA2068937@coredump.intra.peff.net","threadId":"65912","inReplyTo":"20260702212235.GC2051171@coredump.intra.peff.net","subject":"Re: [PATCH 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-02T22:18:58Z","receivedAt":"2026-07-02T22:19:00Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 05:22:35PM -0400, Jeff King wrote:\n\n> On Thu, Jul 02, 2026 at 02:00:58PM +0200, Patrick Steinhardt wrote:\n> \n> > This test has also been blowing up in the \"linux32\" CI job in GitHub\n> > Workflows since 7a094d68a2 (ci: run expensive tests on push builds to\n> > integration branches, 2026-05-08). But that job doesn't only fail, it\n> > also hangs, and that has been concealing the failure.\n> \n> One thing I don't understand about this and a few other patches in this\n> series: I've been getting passing GitHub Actions runs, including\n> linux32, even after that commit turned on the expensive jobs.\n> \n> From your description it sounds like it should _never_ work, but it does\n> for me. It's possible there's something going on in my CI builds that\n> would cause the expensive tests not to run, but I don't think so. Am I\n> misunderstanding the problem? Or is there something missing from the\n> analysis?\n\nAh, nevermind. It _is_ my setup. We run the expensive tests only on pull\nrequests, or when pushing to some specific branches, none of which match\nthe name of my particular integration branch.\n\nGiven all of the headaches I'm hesitant to \"fix\" my setup to run them,\nbut I probably should. ;)\n\n-Peff\n"},{"id":"547036","messageId":"akdLqNHW3pGThQat@pks.im","threadId":"65912","inReplyTo":"20260702211614.GB2051171@coredump.intra.peff.net","subject":"Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T05:42:00Z","receivedAt":"2026-07-03T05:42:06Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 05:16:14PM -0400, Jeff King wrote:\n> On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:\n> \n> > This test setup is extremely expensive, as `test_copy_bytes` is\n> > implemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\n> > time. So as we write 1GB of data, we end up doing 1 billion reads and\n> > writes. This naturally takes a while: it takes 6 minutes on my system,\n> > and around 40 minutes in some CI jobs!\n> > \n> > We can do much better though, as genzeros already knows to handle an\n> > optional limit of how much data it is supposed to write, which allows us\n> > to remove the call to `test_copy_bytes`. Furthermore, it has already\n> > been optimized to generate the data fast.\n> \n> Seems like a good fix for this case, where we can skip the extra process\n> entirely.\n> \n> It feels like test_copy_bytes should be able to do much better in\n> general. The obvious thing to reach for is \"head -c\", but the function\n> was originally added because that wasn't portable. The \"-c\" option is\n> not in POSIX, though the original comment claims IRIX was the problem,\n> so I wonder if \"head -c\" is de facto portable these days.\n\nAn alternative could be to implement a simple helper as part of our\ntest-tool. But I doubt it's really worth it: almost all callers only\nwant to copy a small number of bytes. The only exception seems to be\nt0021, where we copy up to 65kB. But that whole test suite still only\ntakes ~3 seconds, so optimizing that feels like wasted time to me.\n\nPatrick\n"},{"id":"547037","messageId":"akdLryzNx1Vi2BnL@pks.im","threadId":"65912","inReplyTo":"20260702213044.GD2051171@coredump.intra.peff.net","subject":"Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T05:42:07Z","receivedAt":"2026-07-03T05:42:12Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 05:30:44PM -0400, Jeff King wrote:\n> On Thu, Jul 02, 2026 at 02:00:59PM +0200, Patrick Steinhardt wrote:\n> \n> > One of the tests in t7900 is marked with EXPENSIVE because we create a\n> > repository with 2GB of data that we end up repacking. We never clean up\n> > that repository though, so we occupy the full 2GB of data until the end\n> > of the test suite. Besides clogging our disk, it also means that all\n> > subsequent tests may have to repack this data multiple times.\n> \n> Hmm, I hoped this would drop the time to run t7900 with --long, but it\n> takes about 1m40s both before and after your patch (vs ~6s without\n> --long). Just looking at the script, I'd guess that it's because the\n> subsequent repacks are mostly incremental or geometric, so they don't\n> need to write the big pack.\n> \n> Oh well. It still seems like an obvious improvement, though, both in\n> terms of peak disk usage and avoiding unwanted surprises when more tests\n> are added later.\n\nYeah, the commit message is a bit hand-wavy there indeed. I think the\nbigger argument here is that having a test that is marked as EXPENSIVE\nand that may influence subsequent tests is just a bad idea.\n\nPatrick\n"},{"id":"547038","messageId":"akdLuICaYO5Hqd45@pks.im","threadId":"65912","inReplyTo":"akakvnoAswZx+DNI@szeder.dev","subject":"Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T05:42:16Z","receivedAt":"2026-07-03T05:42:22Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 07:49:50PM +0200, SZEDER Gábor wrote:\n> On Thu, Jul 02, 2026 at 02:00:56PM +0200, Patrick Steinhardt wrote:\n> > In t4141 we generate a patch that is roughly 1GB in size to verify that\n> > git-apply(1) indeed rejects that patch. We generate that patch by\n> > prepending a patch header and then executing `test-tool genzeros`\n> > without a limit. This causes us to print infinitely many zeros, and we\n> > limit the overall amount of generated bytes via `test_copy_bytes`.\n> > \n> > This test setup is extremely expensive, as `test_copy_bytes` is\n> > implemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\n> > time. So as we write 1GB of data, we end up doing 1 billion reads and\n> > writes. This naturally takes a while: it takes 6 minutes on my system,\n> > and around 40 minutes in some CI jobs!\n> > \n> > We can do much better though, as genzeros already knows to handle an\n> > optional limit of how much data it is supposed to write, which allows us\n> > to remove the call to `test_copy_bytes`. Furthermore, it has already\n> > been optimized to generate the data fast.\n> > \n> > And indeed, doing this conversion drops the test execution to less than\n> > a second on my machine, so that we can drop the EXPENSIVE prerequisite.\n> \n> EXPENSIVE is not only about execution time, but about resources in\n> general.  While the modified test finishes quite fast indeed, 'git\n> apply' uses over 1GB of RSS.  Therefore, the EXPENSIVE prerequisite\n> should be kept.\n\nThat's fair. It's questionable whether 1GB of RSS really is expensive\nnowadays anymore, but I don't mind reinstating the prerequisite.\n\nPatrick\n"},{"id":"547041","messageId":"20260703070030.GA2082500@coredump.intra.peff.net","threadId":"65912","inReplyTo":"akdLqNHW3pGThQat@pks.im","subject":"Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-03T07:00:30Z","receivedAt":"2026-07-03T07:00:37Z","isPatch":true,"body":"On Fri, Jul 03, 2026 at 07:42:00AM +0200, Patrick Steinhardt wrote:\n\n> > It feels like test_copy_bytes should be able to do much better in\n> > general. The obvious thing to reach for is \"head -c\", but the function\n> > was originally added because that wasn't portable. The \"-c\" option is\n> > not in POSIX, though the original comment claims IRIX was the problem,\n> > so I wonder if \"head -c\" is de facto portable these days.\n> \n> An alternative could be to implement a simple helper as part of our\n> test-tool. But I doubt it's really worth it: almost all callers only\n> want to copy a small number of bytes. The only exception seems to be\n> t0021, where we copy up to 65kB. But that whole test suite still only\n> takes ~3 seconds, so optimizing that feels like wasted time to me.\n\nYeah, you're probably right that it's not worth worrying too much about.\n\n-Peff\n"},{"id":"547042","messageId":"20260703070048.GB2082500@coredump.intra.peff.net","threadId":"65912","inReplyTo":"akdLryzNx1Vi2BnL@pks.im","subject":"Re: [PATCH 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-03T07:00:48Z","receivedAt":"2026-07-03T07:00:49Z","isPatch":true,"body":"On Fri, Jul 03, 2026 at 07:42:07AM +0200, Patrick Steinhardt wrote:\n\n> > Hmm, I hoped this would drop the time to run t7900 with --long, but it\n> > takes about 1m40s both before and after your patch (vs ~6s without\n> > --long). Just looking at the script, I'd guess that it's because the\n> > subsequent repacks are mostly incremental or geometric, so they don't\n> > need to write the big pack.\n> > \n> > Oh well. It still seems like an obvious improvement, though, both in\n> > terms of peak disk usage and avoiding unwanted surprises when more tests\n> > are added later.\n> \n> Yeah, the commit message is a bit hand-wavy there indeed. I think the\n> bigger argument here is that having a test that is marked as EXPENSIVE\n> and that may influence subsequent tests is just a bad idea.\n\nYes, very much agreed.\n\n-Peff\n"},{"id":"547053","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH v2 0/9] t: fixes and improvements for GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:03Z","receivedAt":"2026-07-03T09:24:19Z","isPatch":true,"body":"Hi,\n\nthis series started out as a simple two-patch series that wired up the\nGitLab CI badge in our README and GIT_TEST_LONG for GitLab CI. But as it\ntypically goes, tests broke on GitLab CI, which made me realize that\nthey are broken even on GitHub's master branch right now. Some tests are\nfailing in the linux32 job, and we only didn't notice because the whole\npipeline hangs.\n\nSo I had to go down the rabbit hole a bit, the result of which is this\npatch series.\n\nChanges in v2:\n  - Reinstate the EXPENSIVE prerequisite on t4141, as we still end up\n    reading 1GB of data into memory.\n  - Improve a rather hand-wavy commit message.\n  - Link to v1: https://patch.msgid.link/20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im\n\nThanks!\n\nPatrick\n\n[1]: <akIfsaVMB_S6kfJQ@pks.im>\n\n---\nPatrick Steinhardt (9):\n      README: add GitLab CI badge to make it more discoverable\n      t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n      t4141: fix inefficient use of dd(1)\n      t5608: reduce maximum disk usage\n      t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n      t7900: clean up large EXPENSIVE repository\n      t: use `test_bool_env` to parse GIT_TEST_LONG\n      gitlab-ci: disable RAM disk on macOS jobs\n      gitlab-ci: enable \"GIT_TEST_LONG\"\n\n .gitlab-ci.yml             | 13 ++++-----\n README.md                  |  3 ++-\n ci/lib.sh                  | 12 +++++++--\n t/t0021-conversion.sh      |  2 +-\n t/t4141-apply-too-large.sh |  5 ++--\n t/t5608-clone-2gb.sh       | 66 ++++++++++++++++++++++++----------------------\n t/t7508-status.sh          |  2 +-\n t/t7900-maintenance.sh     | 56 +++++++++++++++++++++------------------\n t/test-lib.sh              |  4 +--\n 9 files changed, 91 insertions(+), 72 deletions(-)\n\nRange-diff versus v1:\n\n 1:  1f445b2106 =  1:  a348e70b40 README: add GitLab CI badge to make it more discoverable\n 2:  f2d21ef6f7 =  2:  c7444bddf3 t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n 3:  656d6b9ada !  3:  aea7f61bbb t4141: fix inefficient use of dd(1)\n    @@ Commit message\n         been optimized to generate the data fast.\n     \n         And indeed, doing this conversion drops the test execution to less than\n    -    a second on my machine, so that we can drop the EXPENSIVE prerequisite.\n    +    a second on my machine. That means that in theory it becomes feasible to\n    +    drop the EXPENSIVE prerequisite now. But git-apply(1) still soaks up 1GB\n    +    of data into memory, which may count as being expensive. Consequently,\n    +    we keep the prerequisite intact.\n     \n         Signed-off-by: Patrick Steinhardt <ps@pks.im>\n     \n      ## t/t4141-apply-too-large.sh ##\n     @@ t/t4141-apply-too-large.sh: test_description='git apply with too-large patch'\n    - \n      . ./test-lib.sh\n      \n    --test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n    + test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n     -\tsz=$((1024 * 1024 * 1023)) &&\n    -+test_expect_success 'git apply rejects patches that are too large' '\n      \t{\n      \t\tcat <<-\\EOF &&\n      \t\tdiff --git a/file b/file\n 4:  91ea8610ad =  4:  30b618259e t5608: reduce maximum disk usage\n 5:  5d1f630617 =  5:  23898a60be t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n 6:  4938e39e47 !  6:  835fa0f8e1 t7900: clean up large EXPENSIVE repository\n    @@ Commit message\n         One of the tests in t7900 is marked with EXPENSIVE because we create a\n         repository with 2GB of data that we end up repacking. We never clean up\n         that repository though, so we occupy the full 2GB of data until the end\n    -    of the test suite. Besides clogging our disk, it also means that all\n    -    subsequent tests may have to repack this data multiple times.\n    +    of the test suite.\n    +\n    +    Besides clogging our disk, having an EXPENSIVE test that alters the\n    +    repository's state used by subsequent tests is also a bad idea, as it\n    +    can easily have an impact on the heuristics used by other maintenance\n    +    tasks.\n     \n         Adapt the test so that we create the data in a standalone repository\n         that we clean up at the end of the test. While at it, also disable\n 7:  3a19541964 =  7:  13fa3db8cd t: use `test_bool_env` to parse GIT_TEST_LONG\n 8:  7d33694504 =  8:  d8f94cb564 gitlab-ci: disable RAM disk on macOS jobs\n 9:  56c0239056 =  9:  d4792b76a0 gitlab-ci: enable \"GIT_TEST_LONG\"\n\n---\nbase-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\nchange-id: 20260701-b4-pks-t-fixes-for-GIT-TEST-LONG-78e538bf0e06\n\n"},{"id":"547054","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-1-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 1/9] README: add GitLab CI badge to make it more discoverable","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:04Z","receivedAt":"2026-07-03T09:24:20Z","isPatch":true,"body":"The Git project uses CI systems from both GitHub and GitLab. While both\nof these systems are extensively used in day-to-day work, we only have a\nlink to the GitHub Workflows in our README, which makes the GitLab CI\nhard to discover.\n\nImprove the situation by adding a second badge for GitLab CI to our\nREADME.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n README.md | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/README.md b/README.md\nindex d87bca1b8c..46489b0971 100644\n--- a/README.md\n+++ b/README.md\n@@ -1,4 +1,5 @@\n-[![Build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)\n+[![GitHub build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)\n+[![GitLab build status](https://gitlab.com/git-scm/git/badges/master/pipeline.svg)](https://gitlab.com/git-scm/git/-/pipelines?ref=master)\n \n Git - fast, scalable, distributed revision control system\n =========================================================\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547055","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-2-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:05Z","receivedAt":"2026-07-03T09:24:21Z","isPatch":true,"body":"One of the tests in t0021 writes a 2GB file and then roundtrips it\nthrough the clean/sumdge filters. This test is broken on 32 bit\nplatforms because they typically don't handle files larger then\n`SSIZE_MAX` well at all.\n\nWhile our CI has a \"linux32\" job that should in theory hit this issue,\nwe never noticed it because we didn't use to run EXPENSIVE tests until\n7a094d68a2 (ci: run expensive tests on push builds to integration\nbranches, 2026-05-08). And after that commit, the test does not fail but\ninstead hangs completely.\n\nIdeally, we'd of course properly detect this situation and then test for\nit. In practice, this turns out to be hard as the test failure are not\nreliable as they often (but not always) run into ENOMEM errors.\n\nInstead, skip the test altogether.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0021-conversion.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex 033b00a364..7b9a0ca877 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -296,7 +296,7 @@ test_expect_success 'filter that does not read is fine' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success EXPENSIVE 'filter large file' '\n+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '\n \ttest_config filter.largefile.smudge cat &&\n \ttest_config filter.largefile.clean cat &&\n \ttest_seq -f \"%1048576d\" 1 2048 >2GB &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547056","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-3-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 3/9] t4141: fix inefficient use of dd(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:06Z","receivedAt":"2026-07-03T09:24:24Z","isPatch":true,"body":"In t4141 we generate a patch that is roughly 1GB in size to verify that\ngit-apply(1) indeed rejects that patch. We generate that patch by\nprepending a patch header and then executing `test-tool genzeros`\nwithout a limit. This causes us to print infinitely many zeros, and we\nlimit the overall amount of generated bytes via `test_copy_bytes`.\n\nThis test setup is extremely expensive, as `test_copy_bytes` is\nimplemented via `dd ibs=1 count=\"$1\"`, which copies data one byte at a\ntime. So as we write 1GB of data, we end up doing 1 billion reads and\nwrites. This naturally takes a while: it takes 6 minutes on my system,\nand around 40 minutes in some CI jobs!\n\nWe can do much better though, as genzeros already knows to handle an\noptional limit of how much data it is supposed to write, which allows us\nto remove the call to `test_copy_bytes`. Furthermore, it has already\nbeen optimized to generate the data fast.\n\nAnd indeed, doing this conversion drops the test execution to less than\na second on my machine. That means that in theory it becomes feasible to\ndrop the EXPENSIVE prerequisite now. But git-apply(1) still soaks up 1GB\nof data into memory, which may count as being expensive. Consequently,\nwe keep the prerequisite intact.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t4141-apply-too-large.sh | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t4141-apply-too-large.sh b/t/t4141-apply-too-large.sh\nindex eac6f7e151..9dbed940db 100755\n--- a/t/t4141-apply-too-large.sh\n+++ b/t/t4141-apply-too-large.sh\n@@ -5,7 +5,6 @@ test_description='git apply with too-large patch'\n . ./test-lib.sh\n \n test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n-\tsz=$((1024 * 1024 * 1023)) &&\n \t{\n \t\tcat <<-\\EOF &&\n \t\tdiff --git a/file b/file\n@@ -14,8 +13,8 @@ test_expect_success EXPENSIVE 'git apply rejects patches that are too large' '\n \t\t+++ b/file\n \t\t@@ -0,0 +1 @@\n \t\tEOF\n-\t\ttest-tool genzeros\n-\t} | test_copy_bytes $sz | test_must_fail git apply 2>err &&\n+\t\ttest-tool genzeros $((1024 * 1024 * 1023))\n+\t} | test_must_fail git apply 2>err &&\n \tgrep \"patch too large\" err\n '\n \n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547057","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-4-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 4/9] t5608: reduce maximum disk usage","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:07Z","receivedAt":"2026-07-03T09:24:27Z","isPatch":true,"body":"The tests in t5608 perform a couple of clones of repositories that are\nsomewhat large. Ultimately, we end up creating:\n\n  - A setup repository that contains 2GB of uncompressed pack data.\n\n  - A bare clone that contains the same 2GB of data.\n\n  - A clone with worktree writes a 2GB packfile and a 2GB worktree.\n\n  - A second setup repository that contains a 4GB packfile.\n\n  - Two 4GB clone of that repository.\n\nSome of these clones ultimately hardlink files, which ensures that we at\nleast don't end up with more than 20GB of data. But at the end of the\ntest we still have around 16GB of data, which is only a tiny bit better.\n\nRefactor the test to prune repositories after they have no use anymore.\nThis reduced the peak disk usage of this test to 8GB.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t5608-clone-2gb.sh | 66 ++++++++++++++++++++++++++++------------------------\n 1 file changed, 35 insertions(+), 31 deletions(-)\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex 4f8a95ddda..5d56debf1c 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -10,45 +10,47 @@ then\n fi\n \n test_expect_success 'setup' '\n-\n-\tgit config pack.compression 0 &&\n-\tgit config pack.depth 0 &&\n-\tblobsize=$((100*1024*1024)) &&\n-\tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n-\ti=1 &&\n-\t(while test $i -le $blobcount\n-\t do\n-\t\tprintf \"Generating blob $i/$blobcount\\r\" >&2 &&\n-\t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n-\t\t#test-tool genrandom $i $blobsize &&\n-\t\tprintf \"%-${blobsize}s\" $i &&\n-\t\techo \"M 100644 :$i $i\" >> commit &&\n-\t\ti=$(($i+1)) ||\n-\t\techo $? > exit-status\n-\t done &&\n-\t echo \"commit refs/heads/main\" &&\n-\t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n-\t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n-\t echo \"data 5\" &&\n-\t echo \">2gb\" &&\n-\t cat commit) |\n-\tgit fast-import --big-file-threshold=2 &&\n-\ttest ! -f exit-status\n-\n+\tgit init 2gb-repo &&\n+\t(\n+\t\tcd 2gb-repo &&\n+\t\tgit config pack.compression 0 &&\n+\t\tgit config pack.depth 0 &&\n+\t\tblobsize=$((100*1024*1024)) &&\n+\t\tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n+\t\ti=1 &&\n+\t\t(while test $i -le $blobcount\n+\t\t do\n+\t\t\tprintf \"Generating blob $i/$blobcount\\r\" >&2 &&\n+\t\t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n+\t\t\t#test-tool genrandom $i $blobsize &&\n+\t\t\tprintf \"%-${blobsize}s\" $i &&\n+\t\t\techo \"M 100644 :$i $i\" >> commit &&\n+\t\t\ti=$(($i+1)) ||\n+\t\t\techo $? > exit-status\n+\t\t done &&\n+\t\t echo \"commit refs/heads/main\" &&\n+\t\t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n+\t\t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n+\t\t echo \"data 5\" &&\n+\t\t echo \">2gb\" &&\n+\t\t cat commit) |\n+\t\tgit fast-import --big-file-threshold=2 &&\n+\t\ttest ! -f exit-status\n+\t)\n '\n \n test_expect_success 'clone - bare' '\n-\n-\tgit clone --bare --no-hardlinks . clone-bare\n-\n+\ttest_when_finished rm -rf clone-bare &&\n+\tgit clone --bare --no-hardlinks 2gb-repo clone-bare\n '\n \n test_expect_success 'clone - with worktree, file:// protocol' '\n-\n-\tgit clone \"file://$(pwd)\" clone-wt\n-\n+\ttest_when_finished rm -rf clone-wt &&\n+\tgit clone \"file://$(pwd)/2gb-repo\" clone-wt\n '\n \n+rm -rf 2gb-repo 2>/dev/null\n+\n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '\n \tlarge_blob_size=$((4*1024*1024*1024+1)) &&\n \tgit init --bare 4gb-repo &&\n@@ -61,6 +63,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'set up repo with >4GB object' '\n '\n \n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-objects' '\n+\ttest_when_finished rm -rf 4gb-clone-unpack &&\n \t# The synthesized pack has five objects, so a large unpack limit keeps\n \t# fetch-pack on the unpack-objects path.\n \tgit -c fetch.unpackLimit=100 clone --bare \\\n@@ -77,6 +80,7 @@ test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone >4GB object via unpack-obje\n '\n \n test_expect_success SIZE_T_IS_64BIT,EXPENSIVE 'clone with >4GB object via index-pack' '\n+\ttest_when_finished rm -rf 4gb-clone-index &&\n \t# Force fetch-pack to hand the pack to index-pack instead.\n \tgit -c fetch.unpackLimit=1 clone --bare \\\n \t\t\"file://$(pwd)/4gb-repo\" 4gb-clone-index &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547058","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-5-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:08Z","receivedAt":"2026-07-03T09:24:29Z","isPatch":true,"body":"One of the tests in t7508 is marked as EXPENSIVE because it ends up\ncreating and adding files that are multiple gigabytes in size. This\ntakes a while to complete, hence the EXPENSIVE prerequisite.\n\nBesides being expensive though the test can only work on systems where\n`size_t` is at least 64 bit. This is because one of the created files\nis larger than 4GB, and because Git tracks object size via `size_t` it\nwill eventually blow up.\n\nThis test has also been blowing up in the \"linux32\" CI job in GitHub\nWorkflows since 7a094d68a2 (ci: run expensive tests on push builds to\nintegration branches, 2026-05-08). But that job doesn't only fail, it\nalso hangs, and that has been concealing the failure.\n\nFix the issue by marking the test as requiring 64 bit `size_t`.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7508-status.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex c2057bc94c..dfdd78b6fe 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -1773,7 +1773,7 @@ test_expect_success 'slow status advice when core.untrackedCache true, and fsmon\n \t)\n '\n \n-test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '\n+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '\n \t(\n \t\tmkdir large-file &&\n \t\tcd large-file &&\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547059","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-6-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:09Z","receivedAt":"2026-07-03T09:24:32Z","isPatch":true,"body":"One of the tests in t7900 is marked with EXPENSIVE because we create a\nrepository with 2GB of data that we end up repacking. We never clean up\nthat repository though, so we occupy the full 2GB of data until the end\nof the test suite.\n\nBesides clogging our disk, having an EXPENSIVE test that alters the\nrepository's state used by subsequent tests is also a bad idea, as it\ncan easily have an impact on the heuristics used by other maintenance\ntasks.\n\nAdapt the test so that we create the data in a standalone repository\nthat we clean up at the end of the test. While at it, also disable\nauto-maintenance so that it does not race with our manual maintenance.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7900-maintenance.sh | 56 ++++++++++++++++++++++++++++----------------------\n 1 file changed, 31 insertions(+), 25 deletions(-)\n\ndiff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh\nindex d7f82e1bec..8a7e1306d0 100755\n--- a/t/t7900-maintenance.sh\n+++ b/t/t7900-maintenance.sh\n@@ -461,36 +461,42 @@ test_expect_success 'incremental-repack task' '\n '\n \n test_expect_success EXPENSIVE 'incremental-repack 2g limit' '\n-\ttest_config core.compression 0 &&\n+\ttest_when_finished rm -rf expensive-repo &&\n+\tgit init expensive-repo &&\n+\t(\n+\t\tcd expensive-repo &&\n+\t\tgit config set core.compression 0 &&\n+\t\tgit config set maintenance.auto false &&\n \n-\tfor i in $(test_seq 1 5)\n-\tdo\n-\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n-\t\treturn 1\n-\tdone &&\n-\tgit add big &&\n-\tgit commit -qm \"Add big file (1)\" &&\n+\t\tfor i in $(test_seq 1 5)\n+\t\tdo\n+\t\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n+\t\t\treturn 1\n+\t\tdone &&\n+\t\tgit add big &&\n+\t\tgit commit -qm \"Add big file (1)\" &&\n \n-\t# ensure any possible loose objects are in a pack-file\n-\tgit maintenance run --task=loose-objects &&\n+\t\t# ensure any possible loose objects are in a pack-file\n+\t\tgit maintenance run --task=loose-objects &&\n \n-\trm big &&\n-\tfor i in $(test_seq 6 10)\n-\tdo\n-\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n-\t\treturn 1\n-\tdone &&\n-\tgit add big &&\n-\tgit commit -qm \"Add big file (2)\" &&\n+\t\trm big &&\n+\t\tfor i in $(test_seq 6 10)\n+\t\tdo\n+\t\t\ttest-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||\n+\t\t\treturn 1\n+\t\tdone &&\n+\t\tgit add big &&\n+\t\tgit commit -qm \"Add big file (2)\" &&\n \n-\t# ensure any possible loose objects are in a pack-file\n-\tgit maintenance run --task=loose-objects &&\n+\t\t# ensure any possible loose objects are in a pack-file\n+\t\tgit maintenance run --task=loose-objects &&\n \n-\t# Now run the incremental-repack task and check the batch-size\n-\tGIT_TRACE2_EVENT=\"$(pwd)/run-2g.txt\" git maintenance run \\\n-\t\t--task=incremental-repack 2>/dev/null &&\n-\ttest_subcommand git multi-pack-index repack \\\n-\t\t --no-progress --batch-size=2147483647 <run-2g.txt\n+\t\t# Now run the incremental-repack task and check the batch-size\n+\t\tGIT_TRACE2_EVENT=\"$(pwd)/run-2g.txt\" git maintenance run \\\n+\t\t\t--task=incremental-repack 2>/dev/null &&\n+\t\ttest_subcommand git multi-pack-index repack \\\n+\t\t\t--no-progress --batch-size=2147483647 <run-2g.txt\n+\t)\n '\n \n run_incremental_repack_and_verify () {\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547060","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-7-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 7/9] t: use `test_bool_env` to parse GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:10Z","receivedAt":"2026-07-03T09:24:35Z","isPatch":true,"body":"It's currently hard to explicitly disable GIT_TEST_LONG by setting it to\n`false`. Fix this by using `test_bool_env` instead.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/lib.sh     | 2 +-\n t/test-lib.sh | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex b939110a6e..01a0bc6b75 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -321,7 +321,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease\n # enable the long tests for pushes to the integration branches as well.\n case \"$GITHUB_EVENT_NAME,$CI_BRANCH\" in\n pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)\n-\texport GIT_TEST_LONG=YesPlease\n+\texport GIT_TEST_LONG=true\n \t;;\n esac\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ceefb99bff..623fcfb747 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -210,7 +210,7 @@ parse_option () {\n \t-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)\n \t\timmediate=t ;;\n \t-l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)\n-\t\tGIT_TEST_LONG=t; export GIT_TEST_LONG ;;\n+\t\tGIT_TEST_LONG=true; export GIT_TEST_LONG ;;\n \t-r)\n \t\tmark_option_requires_arg \"$opt\" run_list\n \t\t;;\n@@ -1849,7 +1849,7 @@ test_lazy_prereq AUTOIDENT '\n '\n \n test_lazy_prereq EXPENSIVE '\n-\ttest -n \"$GIT_TEST_LONG\"\n+\ttest_bool_env GIT_TEST_LONG false\n '\n \n test_lazy_prereq EXPENSIVE_ON_WINDOWS '\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547061","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-8-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 8/9] gitlab-ci: disable RAM disk on macOS jobs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:11Z","receivedAt":"2026-07-03T09:24:37Z","isPatch":true,"body":"When we added the macOS jobs to GitLab CI in 56090a35ab (ci: add macOS\njobs to GitLab CI, 2024-01-18) we had to work around some very slow\ndisks. This workaround essentially creates a RAM disk that we mount,\nwhere all test data is being written into RAM instead of the real disk.\n\nIn the next commit though we're about to enable \"GIT_TEST_LONG\", which\nwill make tests run that are marked with the \"EXPENSIVE\" prerequisite.\nThis change will make a couple of tests run that write up to 8GB of data\ninto the test output directory. As our RAM disk is only 4GB in size,\nthis change will cause ENOSPC errors.\n\nWe could accommodate for this by increasing the size of the RAM disk.\nIn c9d708b7fc (gitlab-ci: upgrade macOS runners, 2026-05-21) we have\nupgraded our runners to use the \"large\" runners, which have 16GB of RAM\navailable. So we could easily expand the RAM disk to a capacity of for\nexample 12GB. But some test runs have shown that this is still quite\nflaky overall, as we get quite close to our limits.\n\nInstead, drop the workaround completely. This does indeed slow down\nexecution of the test jobs:\n\n  - osx-clang goes from 18 minutes to 25 minutes\n\n  - osx-meson goes from 21 minutes to 33 minutes\n\n  - osx-reftable stays at 21 minutes\n\nThe last one seems like an outlier. The only explanation that I have is\nthat we end up writing significantly less files with the reftable\nbackend, which ultimately causes less I/O.\n\nOverall though, it's preferable to have something that works with the\nleast amount of flakiness compared to having something else that is\nfaster but unstable. Despite that, the macOS jobs aren't even the\nslowest jobs, so this doesn't extend the overall pipeline's length.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .gitlab-ci.yml | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex 1a8e90932c..a4aebe8b71 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -88,13 +88,8 @@ test:osx:\n   tags:\n     - saas-macos-large-m2pro\n   variables:\n-    TEST_OUTPUT_DIRECTORY: \"/Volumes/RAMDisk\"\n+    TEST_OUTPUT_DIRECTORY: \"/tmp/test-output\"\n   before_script:\n-    # Create a 4GB RAM disk that we use to store test output on. This small hack\n-    # significantly speeds up tests by more than a factor of 2 because the\n-    # macOS runners use network-attached storage as disks, which is _really_\n-    # slow with the many small writes that our tests do.\n-    - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk\n     - ./ci/install-dependencies.sh\n   script:\n     - ./ci/run-build-and-tests.sh\n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547062","messageId":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-9-79076a7e0c62@pks.im","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im","subject":"[PATCH v2 9/9] gitlab-ci: enable \"GIT_TEST_LONG\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T09:24:12Z","receivedAt":"2026-07-03T09:24:40Z","isPatch":true,"body":"Starting with 7a094d68a2 (ci: run expensive tests on push builds to\nintegration branches, 2026-05-08) we run expensive tests in our CI for\ncertain events. So far, this has only been wired up for GitHub Workflows\nthough, which creates a test gap for GitLab CI.\n\nPlug this gap by also making this work for the latter.\n\nNote that these tests cannot be run on the Windows runners, as they only\nhave 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests,\nso we explicitly disable \"GIT_TEST_LONG\" on these jobs.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .gitlab-ci.yml |  6 ++++++\n ci/lib.sh      | 12 ++++++++++--\n 2 files changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex a4aebe8b71..1c4d04da9d 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -147,6 +147,9 @@ test:mingw64:\n   needs:\n     - job: \"build:mingw64\"\n       artifacts: true\n+  variables:\n+    # Windows runners don't have enough RAM to run EXPENSIVE tests.\n+    GIT_TEST_LONG: false\n   before_script:\n     - *windows_before_script\n     - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'\n@@ -195,6 +198,9 @@ test:msvc-meson:\n   script:\n     - |\n       & \"C:/Program Files/Git/usr/bin/bash.exe\" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'\n+  variables:\n+    # Windows runners don't have enough RAM to run EXPENSIVE tests.\n+    GIT_TEST_LONG: false\n   after_script:\n     - |\n       if ($env:CI_JOB_STATUS -ne \"success\") {\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 01a0bc6b75..6c52154eac 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -215,6 +215,7 @@ then\n \ttest macos != \"$CI_OS_NAME\" || CI_OS_NAME=osx\n \tCI_REPO_SLUG=\"$GITHUB_REPOSITORY\"\n \tCI_JOB_ID=\"$GITHUB_RUN_ID\"\n+\tCI_EVENT=\"$GITHUB_EVENT_NAME\"\n \tCC=\"${CC_PACKAGE:-${CC:-gcc}}\"\n \tDONT_SKIP_TAGS=t\n \thandle_failed_tests () {\n@@ -239,6 +240,13 @@ then\n \tCI_BRANCH=\"$CI_COMMIT_REF_NAME\"\n \tCI_COMMIT=\"$CI_COMMIT_SHA\"\n \n+\tcase \"$CI_PIPELINE_SOURCE\" in\n+\tmerge_request_event)\n+\t\tCI_EVENT=pull_request;;\n+\t*)\n+\t\tCI_EVENT=\"$CI_PIPELINE_SOURCE\";;\n+\tesac\n+\n \tcase \"$OS,$CI_JOB_IMAGE\" in\n \tWindows_NT,*)\n \t\tCI_OS_NAME=windows\n@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease\n # enable \"expensive\" tests for PR events.\n # In order to catch bugs introduced at integration time by mismerges,\n # enable the long tests for pushes to the integration branches as well.\n-case \"$GITHUB_EVENT_NAME,$CI_BRANCH\" in\n+case \"$CI_EVENT,$CI_BRANCH\" in\n pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)\n-\texport GIT_TEST_LONG=true\n+\texport GIT_TEST_LONG=${GIT_TEST_LONG:-true}\n \t;;\n esac\n \n\n-- \n2.55.0.795.g602f6c329a.dirty\n\n"},{"id":"547110","messageId":"xmqqse60ht57.fsf@gitster.g","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-2-79076a7e0c62@pks.im","subject":"Re: [PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-03T17:36:52Z","receivedAt":"2026-07-03T17:36:55Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\nThe subject reads \"skip EXPENSIVE test that is broken without\nSIZE_T_IS_32BIT\", but we need to add prerequisite for 64BIT,\nwouldn't it be more accurate to say without SIZE_T_IS_64BIT?\n\nThat is, the test is broken with SIZE_T_IS_32BIT, no?\n\n> ...\n> -test_expect_success EXPENSIVE 'filter large file' '\n> +test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'filter large file' '\n>  \ttest_config filter.largefile.smudge cat &&\n>  \ttest_config filter.largefile.clean cat &&\n>  \ttest_seq -f \"%1048576d\" 1 2048 >2GB &&\n"},{"id":"547112","messageId":"xmqqmrw8ht2t.fsf@gitster.g","threadId":"65912","inReplyTo":"20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-5-79076a7e0c62@pks.im","subject":"Re: [PATCH v2 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-03T17:38:18Z","receivedAt":"2026-07-03T17:38:20Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\nThe same comment as [2/9] about 32 vs 64 in the subject \"skip\nEXPENSIVE test that is broken without SIZE_T_IS_32BIT\" applies here,\nI think.\n\n> ...\n> -test_expect_success EXPENSIVE 'status does not re-read unchanged 4 or 8 GiB file' '\n> +test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'status does not re-read unchanged 4 or 8 GiB file' '\n>  \t(\n>  \t\tmkdir large-file &&\n>  \t\tcd large-file &&\n"},{"id":"547186","messageId":"aktJ9R4lRhWswWbt@pks.im","threadId":"65912","inReplyTo":"xmqqse60ht57.fsf@gitster.g","subject":"Re: [PATCH v2 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:49Z","receivedAt":"2026-07-06T06:23:58Z","isPatch":true,"body":"On Fri, Jul 03, 2026 at 10:36:52AM -0700, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> The subject reads \"skip EXPENSIVE test that is broken without\n> SIZE_T_IS_32BIT\", but we need to add prerequisite for 64BIT,\n> wouldn't it be more accurate to say without SIZE_T_IS_64BIT?\n> \n> That is, the test is broken with SIZE_T_IS_32BIT, no?\n\nUgh, it should either be \"with SIZE_T_IS_32BIT\" (which doesn't even\nexist as a prereq) or \"without SIZE_T_IS_64BIT\". Will fix, thanks for\nnoticing!\n\nPatrick\n"}]}