diff mbox series

[4/4] fixup! t4216: test changed path filters with high bit paths

Message ID 5bac3bc2e5b85f553e39b9a334ead372d97eb753.1689789226.git.me@ttaylorr.com (mailing list archive)
State New, archived
Headers show
Series commit-graph: avoid looking at Bloom filter data directly | expand

Commit Message

Taylor Blau July 19, 2023, 5:55 p.m. UTC
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 t/t4216-log-bloom.sh | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh
index 0cf208fdf55..c49528b947a 100755
--- a/t/t4216-log-bloom.sh
+++ b/t/t4216-log-bloom.sh
@@ -404,17 +404,9 @@  test_expect_success 'Bloom generation backfills empty commits' '
 	)
 '
 
-get_bdat_offset () {
-	perl -0777 -ne \
-		'print unpack("N", "$1") if /BDAT\0\0\0\0(....)/ or exit 1' \
-		.git/objects/info/commit-graph
-}
-
 get_first_changed_path_filter () {
-	BDAT_OFFSET=$(get_bdat_offset) &&
-	perl -0777 -ne \
-		'print unpack("H*", substr($_, '$BDAT_OFFSET' + 12, 2))' \
-		.git/objects/info/commit-graph
+	test-tool read-graph bloom-filters >filters.dat &&
+	head -n 1 filters.dat
 }
 
 # chosen to be the same under all Unicode normalization forms
@@ -428,7 +420,7 @@  test_expect_success 'set up repo with high bit path, version 1 changed-path' '
 
 test_expect_success 'setup check value of version 1 changed-path' '
 	(cd highbit1 &&
-		printf "52a9" >expect &&
+		echo "52a9" >expect &&
 		get_first_changed_path_filter >actual &&
 		test_cmp expect actual)
 '