From 73072c5dcbf2477aa3b5d54295f4fa69abf26320 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 25 Sep 2026 12:35:38 -0400 Subject: [PATCH 1/2] t4205: compare huge output without diff The huge-commit test compares output containing a line larger than 2 GiB. For two identical files containing 2,147,483,649 "1" bytes followed by "0\n", GNU diffutils 3.8 on Linux arm64 gives these measurements: Command Mean +/- stddev Maximum RSS (KiB) diff -u expect actual 5.276 +/- 0.572 s 4199924 cmp expect actual 0.506 +/- 0.099 s 1264 The test needs only an equality check. Use test_cmp_bin, which runs cmp, to compare the output byte for byte with less time and memory. Assisted-by: LLM Signed-off-by: Tamir Duberstein Signed-off-by: Junio C Hamano --- t/t4205-log-pretty-formats.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 3865f6abc7..d438a80dd8 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -1189,7 +1189,7 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'set up huge commit' ' test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'log --pretty with huge commit message' ' git log -1 --format="%B%<(1)%x30" $huge_commit >actual && echo 0 >>expect && - test_cmp expect actual + test_cmp_bin expect actual ' test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'log --pretty with huge commit message does not cause allocation failure' ' From c694fc2ab705a9bc9b98d5b62418a66858da6acb Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 25 Sep 2026 12:35:39 -0400 Subject: [PATCH 2/2] ci: align job counts across CI providers GitHub Actions sets JOBS to ten regardless of runner size, while GitLab CI uses the detected CPU count. Use the CPU count for Make and prove on both providers, selecting JOBS after the operating system is identified. Use nproc on Linux and NUMBER_OF_PROCESSORS on Windows. On macOS, use sysctl to avoid requiring nproc before the dependency installer has run; GitHub macOS images need not provide GNU coreutils. Assisted-by: LLM Signed-off-by: Tamir Duberstein Signed-off-by: Junio C Hamano --- ci/lib.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index b939110a6e..ae35bf4ec7 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -226,7 +226,6 @@ then cache_dir="$HOME/none" GIT_TEST_OPTS="--github-workflow-markup" - JOBS=10 distro=$(echo "$CI_JOB_IMAGE" | tr : -) elif test true = "$GITLAB_CI" @@ -242,7 +241,6 @@ then case "$OS,$CI_JOB_IMAGE" in Windows_NT,*) CI_OS_NAME=windows - JOBS=$NUMBER_OF_PROCESSORS ;; *,macos-*) # GitLab CI has Python installed via multiple package managers, @@ -252,11 +250,9 @@ then export PATH="$(brew --prefix)/bin:$PATH" CI_OS_NAME=osx - JOBS=$(nproc) ;; *,almalinux:*|*,alpine:*|*,debian:*|*,fedora:*|*,ubuntu:*|*,i386/ubuntu:*) CI_OS_NAME=linux - JOBS=$(nproc) ;; *) echo "Could not identify OS image" >&2 @@ -283,6 +279,18 @@ else exit 1 fi +case "$CI_OS_NAME" in +windows|windows_nt) + JOBS=$NUMBER_OF_PROCESSORS + ;; +osx) + JOBS=$(sysctl -n hw.logicalcpu) + ;; +*) + JOBS=$(nproc) + ;; +esac + MAKEFLAGS="$MAKEFLAGS --jobs=$JOBS" GIT_PROVE_OPTS="--timer --jobs $JOBS"