git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t4216-log-bloom.sh broken ?

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2024, 16:26 UTC
Message-ID
<xmqqle4sfada.fsf@gitster.g>
In-Reply-To
<20240502055621.GA29945@tb-raspi4>
Torsten Bögershausen <tboegi@web.de> writes:
Show 16 quoted lines
> ++ check_corrupt_graph BDAT clear 00000000
> ++ corrupt_graph BDAT clear 00000000
> ++ graph=.git/objects/info/commit-graph
> ++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
> ++ test 0 = 0
> ++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
> 		} && (exit "$eval_ret"); eval_ret=$?; :'
> ++ git commit-graph write --reachable --changed-paths
> ++ corrupt_chunk_file .git/objects/info/commit-graph BDAT clear 00000000
> ++ fn=.git/objects/info/commit-graph
> ++ shift
> ++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
> override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten
Another probing question.  Do t5318, t5319, t5324, and t5328 pass?
The "mv" is part of the corrupt_chunk_file helper is used by this:
    corrupt_graph () {
            graph=.git/objects/info/commit-graph &&
            test_when_finished "rm -rf $graph" &&
            git commit-graph write --reachable --changed-paths &&
            corrupt_chunk_file $graph "$@"
    }
and reads like this:
    corrupt_chunk_file () {
            fn=$1; shift
            perl "$TEST_DIRECTORY"/lib-chunk/corrupt-chunk-file.pl \
                    "$@" <"$fn" >"$fn.tmp" &&
            mv "$fn.tmp" "$fn"
    }

If the final "mv" is what is failing in the above trace, the test tried to corrupt the objects/info/commit-graph file, expecting that later steps will notice breakage. But if the broken file written in commit-graph.tmp failed to become the final commit-graph, later steps will see healthy graph file and it is understandable that we do not see any breakage that we expect, thus failing the test.

Is "mv" somehow configured to always go interactive on that box and on that box alone? For example if you have ~/bin/mv that does something silly like

	#!/bin/bash
	exec /bin/mv -i "$@

and have ~/bin early in $PATH, it may be sufficient to explain the error we see (I am not claiming that is the only way to cause this test failure; it is just one possible one).

Previous: Junio C Hamano
Message 12 of 12 in “[ANNOUNCE] Git v2.45.0”
  1. Junio C HamanoApr 29, 2024
  2. rsbecker@nexbridge.comMay 1, 2024
  3. t4216-log-bloom.sh broken ?Torsten Bögershausen, May 2, 2024
  4. Junio C HamanoMay 2, 2024
  5. Torsten BögershausenMay 2, 2024
  6. SZEDER GáborMay 2, 2024
  7. Junio C HamanoMay 2, 2024
  8. Junio C HamanoMay 2, 2024
  9. Junio C HamanoMay 2, 2024
  10. Torsten BögershausenMay 2, 2024
  11. Junio C HamanoMay 2, 2024
  12. Junio C HamanoMay 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.