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