{"thread":{"id":"65927","subject":"[PATCH v3 1/9] README: add GitLab CI badge to make it more discoverable","startedAt":"2026-07-06T06:24:07Z","lastAt":"2026-07-07T04:30:28Z","messageCount":12,"participants":["Patrick Steinhardt","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":3,"patchTotal":9},"messages":[{"id":"547187","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-1-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 1/9] README: add GitLab CI badge to make it more discoverable","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:56Z","receivedAt":"2026-07-06T06:24: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":"547190","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260702-b4-pks-t-fixes-for-GIT-TEST-LONG-v1-0-76b4d7bab3d0@pks.im","subject":"[PATCH v3 0/9] t: fixes and improvements for GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:55Z","receivedAt":"2026-07-06T06:24:07Z","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 v3:\n  - Fix commit subjects to mention correct prerequisite.\n  - Link to v2: https://patch.msgid.link/20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im\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_64BIT\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_64BIT\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 v2:\n\n 1:  e4add14ea7 =  1:  afc7563e22 README: add GitLab CI badge to make it more discoverable\n 2:  d762b4d46e !  2:  753e950eaf t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n    @@ Metadata\n     Author: Patrick Steinhardt <ps@pks.im>\n     \n      ## Commit message ##\n    -    t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n    +    t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT\n     \n         One of the tests in t0021 writes a 2GB file and then roundtrips it\n         through the clean/sumdge filters. This test is broken on 32 bit\n 3:  8d43eb2819 =  3:  f776e0fb5f t4141: fix inefficient use of dd(1)\n 4:  fcd048f6f7 =  4:  9754b96a43 t5608: reduce maximum disk usage\n 5:  11df7f2cb9 !  5:  0f2e28dc11 t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n    @@ Metadata\n     Author: Patrick Steinhardt <ps@pks.im>\n     \n      ## Commit message ##\n    -    t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n    +    t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT\n     \n         One of the tests in t7508 is marked as EXPENSIVE because it ends up\n         creating and adding files that are multiple gigabytes in size. This\n 6:  a16bc1754b =  6:  d329a2cd40 t7900: clean up large EXPENSIVE repository\n 7:  b2e6b0d517 =  7:  a336d4ce9e t: use `test_bool_env` to parse GIT_TEST_LONG\n 8:  9632b19164 =  8:  cfff94c79e gitlab-ci: disable RAM disk on macOS jobs\n 9:  a42c613012 =  9:  ed5e8807fe 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":"547188","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-2-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 2/9] t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:57Z","receivedAt":"2026-07-06T06:24:11Z","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":"547189","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-3-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 3/9] t4141: fix inefficient use of dd(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:58Z","receivedAt":"2026-07-06T06:24:12Z","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":"547192","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-4-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 4/9] t5608: reduce maximum disk usage","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:23:59Z","receivedAt":"2026-07-06T06:24: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":"547191","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-5-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 5/9] t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:24:00Z","receivedAt":"2026-07-06T06:24: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":"547194","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-6-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 6/9] t7900: clean up large EXPENSIVE repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:24:01Z","receivedAt":"2026-07-06T06:24:22Z","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":"547193","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-7-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 7/9] t: use `test_bool_env` to parse GIT_TEST_LONG","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:24:02Z","receivedAt":"2026-07-06T06:24: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":"547195","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-8-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 8/9] gitlab-ci: disable RAM disk on macOS jobs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:24:03Z","receivedAt":"2026-07-06T06:24:27Z","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":"547196","messageId":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-9-4f6c5a37fd1f@pks.im","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"[PATCH v3 9/9] gitlab-ci: enable \"GIT_TEST_LONG\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-06T06:24:04Z","receivedAt":"2026-07-06T06:24:29Z","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":"547266","messageId":"xmqq8q7namkm.fsf@gitster.g","threadId":"65927","inReplyTo":"20260706-b4-pks-t-fixes-for-GIT-TEST-LONG-v3-0-4f6c5a37fd1f@pks.im","subject":"Re: [PATCH v3 0/9] t: fixes and improvements for GIT_TEST_LONG","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-06T20:29:45Z","receivedAt":"2026-07-06T20:29:48Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> Hi,\n>\n> this series started out as a simple two-patch series that wired up the\n> GitLab CI badge in our README and GIT_TEST_LONG for GitLab CI. But as it\n> typically goes, tests broke on GitLab CI, which made me realize that\n> they are broken even on GitHub's master branch right now. Some tests are\n> failing in the linux32 job, and we only didn't notice because the whole\n> pipeline hangs.\n>\n> So I had to go down the rabbit hole a bit, the result of which is this\n> patch series.\n>\n> Changes in v3:\n>   - Fix commit subjects to mention correct prerequisite.\n>   - Link to v2: https://patch.msgid.link/20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im\n\nThe interdiff looks trivially correct ;-).\n\nHopefully we are now ready to declare victory and plan to merge this\nto 'next'?\n\nThanks.\n\n\n>  1:  e4add14ea7 =  1:  afc7563e22 README: add GitLab CI badge to make it more discoverable\n>  2:  d762b4d46e !  2:  753e950eaf t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n>     @@ Metadata\n>      Author: Patrick Steinhardt <ps@pks.im>\n>      \n>       ## Commit message ##\n>     -    t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n>     +    t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT\n>      \n>          One of the tests in t0021 writes a 2GB file and then roundtrips it\n>          through the clean/sumdge filters. This test is broken on 32 bit\n>  3:  8d43eb2819 =  3:  f776e0fb5f t4141: fix inefficient use of dd(1)\n>  4:  fcd048f6f7 =  4:  9754b96a43 t5608: reduce maximum disk usage\n>  5:  11df7f2cb9 !  5:  0f2e28dc11 t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n>     @@ Metadata\n>      Author: Patrick Steinhardt <ps@pks.im>\n>      \n>       ## Commit message ##\n>     -    t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BIT\n>     +    t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_64BIT\n>      \n>          One of the tests in t7508 is marked as EXPENSIVE because it ends up\n>          creating and adding files that are multiple gigabytes in size. This\n>  6:  a16bc1754b =  6:  d329a2cd40 t7900: clean up large EXPENSIVE repository\n>  7:  b2e6b0d517 =  7:  a336d4ce9e t: use `test_bool_env` to parse GIT_TEST_LONG\n>  8:  9632b19164 =  8:  cfff94c79e gitlab-ci: disable RAM disk on macOS jobs\n>  9:  a42c613012 =  9:  ed5e8807fe gitlab-ci: enable \"GIT_TEST_LONG\"\n>\n> ---\n> base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\n> change-id: 20260701-b4-pks-t-fixes-for-GIT-TEST-LONG-78e538bf0e06\n"},{"id":"547283","messageId":"20260707043026.GB677056@coredump.intra.peff.net","threadId":"65927","inReplyTo":"xmqq8q7namkm.fsf@gitster.g","subject":"Re: [PATCH v3 0/9] t: fixes and improvements for GIT_TEST_LONG","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2026-07-07T04:30:26Z","receivedAt":"2026-07-07T04:30:28Z","isPatch":true,"body":"On Mon, Jul 06, 2026 at 01:29:45PM -0700, Junio C Hamano wrote:\n\n> > Changes in v3:\n> >   - Fix commit subjects to mention correct prerequisite.\n> >   - Link to v2: https://patch.msgid.link/20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im\n> \n> The interdiff looks trivially correct ;-).\n> \n> Hopefully we are now ready to declare victory and plan to merge this\n> to 'next'?\n\nYeah. I wouldn't say I did a super-deep review, but I did look over the\noriginal and have no complaints.\n\n-Peff\n"}]}