From f0411a4c717e411f773299820c7963bc0ce3d7a4 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 19 Jun 2026 09:20:20 +0200 Subject: [PATCH] t4216: fix no-op test that breaks TAP output In t4216 we have have a prerequisite that is active in case the system's `char` type is signed by default. This prerequisite isn't really used by anything though: while it is used to guard one of our tests, that specific test is essentially a no-op. So all this infrastructure does is to provide some debugging hint to a reader that pays a lot of attention. Besides that, the way we set up the prerequisite also results in broken TAP output on systems where `char` is unsigned by default: we use `test_cmp()` to diff two files outside of of any test body, and if the files differ we enable the prerequisite. If so, the call to `test_cmp()` would also print output, and that output is of course not valid TAP output. That wasn't a problem before 389c83025d (t: let prove fail when parsing invalid TAP output, 2026-06-04), because our TAP parser was configured to be lenient. But starting with that commit, t4216 is now failing on systems with unsigned chars. Drop the whole infrastructure. The prerequisite is not used anywhere else, and the only location where it's used doesn't really provide much value. Reported-by: Todd Zullinger Signed-off-by: Patrick Steinhardt Tested-by: Todd Zullinger Signed-off-by: Junio C Hamano --- t/t4216-log-bloom.sh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh index 49d11131713bab..48a04912c30d84 100755 --- a/t/t4216-log-bloom.sh +++ b/t/t4216-log-bloom.sh @@ -502,27 +502,6 @@ test_expect_success 'set up repo with high bit path, version 1 changed-path' ' git -C highbit1 commit-graph write --reachable --changed-paths ' -test_expect_success 'setup check value of version 1 changed-path' ' - ( - cd highbit1 && - echo "52a9" >expect && - get_first_changed_path_filter >actual - ) -' - -# expect will not match actual if char is unsigned by default. Write the test -# in this way, so that a user running this test script can still see if the two -# files match. (It will appear as an ordinary success if they match, and a skip -# if not.) -if test_cmp highbit1/expect highbit1/actual -then - test_set_prereq SIGNED_CHAR_BY_DEFAULT -fi -test_expect_success SIGNED_CHAR_BY_DEFAULT 'check value of version 1 changed-path' ' - # Only the prereq matters for this test. - true -' - test_expect_success 'setup make another commit' ' # "git log" does not use Bloom filters for root commits - see how, in # revision.c, rev_compare_tree() (the only code path that eventually calls