Thread (8 messages) flat view 8 messages, 3 authors, 17m ago
HOTtoday

[PATCH 1/2] t4205: compare huge output without diff

From: Tamir Duberstein <hidden>
Date: 2026-09-23 17:13:46
Subsystem: the rest · Maintainer: Linus Torvalds

The huge-commit test compares two files with a line larger than 2 GiB.
In Linux GitHub Actions jobs, git log produces its huge output but
its subsequent diff process is killed with SIGKILL.

Use test_cmp_bin to compare the output byte for byte without constructing
a line-oriented diff. Remove the two large files after a successful
comparison, releasing more than 4 GiB before subsequent tests.

Signed-off-by: Tamir Duberstein <redacted>
---
 t/t4205-log-pretty-formats.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 4be5c51489..6279a7e9bc 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -1189,7 +1189,8 @@ 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 &&
+	rm expect actual
 '
 
 test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'log --pretty with huge commit message does not cause allocation failure' '
-- 
2.56.0.rc0.807.ga0c0929ce1.frankengit
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help