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

Re: [PATCH] ci(win+Meson): build in Release mode, avoiding t7001-mv hangs

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 28, 2025, 17:01 UTC
Message-ID
<xmqq8qnkdxu9.fsf@gitster.g>
In-Reply-To
<aA8ymUzWM2t0QkFP@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 18 quoted lines
>> > The reason for this timeout is the test case 'nonsense mv triggers
>> > assertion failure and partially updated index' in t7001-mv (which is
>> > not even a regression test, but instead merely demonstrates a bug that
>> > someone thought someone else should fix at some time). As the name
>> > suggests, it triggers an assertion. The problem with this is that an
>> > assertion on Windows, at least when run in Debug mode, will open a modal
>> > dialog that patiently awaits some buttons to be clicked. Which never
>> > happens in automated builds.
>> 
>> Interesting.
>> 
>> So another viable fix (no, I am not suggesting a counter-proposal,
>> but asking a pure question to see if I understand the issue
>> correctly) is to rewrite "assert(cond)" to "if (cond) BUG(...)"
>> or something like that, so that it truly fails?
>
> On the surface this sounds like a reasonable thing to do, but I don't
> have enough context to be really able to tell.

Interesting again ;-) I didn't realize that it was a fairly recent development. 0fcd473f (t7001: add failure test which triggers assertion, 2024-10-22) is what adds the questionable test.

And I do agree with Dscho's assessment that this is "show a bug without bothering to fix it", which is not what we usually take without first exploring how involved the necessary fix would be.

I wonder in what bad status would a production build that simply disabled the assert() is leaving the resulting repository.

Quoting from the last part of my response [*] to the initial report that eventually turned into the test after 9 months:

 [*] https://lore.kernel.org/git/xmqqil47obnw.fsf@gitster.g/

---- snip snap ---- Thanks for reporting, Kristoffer.

Any takers?
$ git shortlog --since=3.years -s -n -e --no-merges v2.43.0 builtin/mv.c
    15	Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
    10	Elijah Newren <newren@gmail.com>
     5	Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     2	Junio C Hamano <gitster@pobox.com>
     1	Andrzej Hunt <ajrhunt@google.com>
     1	Calvin Wan <calvinwan@google.com>
     1	Derrick Stolee <stolee@gmail.com>
     1	Sebastian Thiel <sebastian.thiel@icloud.com>
     1	Torsten Bögershausen <tboegi@web.de>
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 4 of 17 in “ci(win+Meson): build in Release mode, avoiding t7001-mv hangs”
  1. ci(win+Meson): build in Release mode, avoiding t7001-mv hangsJohannes Schindelin via GitGitGadget, Apr 25, 2025
  2. Junio C HamanoApr 25, 2025
  3. Patrick SteinhardtApr 28, 2025
  4. Junio C HamanoApr 28, 2025
  5. Patrick SteinhardtApr 29, 2025
  6. Junio C HamanoApr 29, 2025
  7. Patrick SteinhardtApr 30, 2025
  8. Patrick SteinhardtApr 30, 2025
  9. Kristoffer HaugsbakkApr 29, 2025
  10. ci(win+Meson): build in Release modeJohannes Schindelin via GitGitGadget, May 3, 2025
  11. Patrick SteinhardtMay 5, 2025
  12. Johannes SchindelinMay 5, 2025
  13. Patrick SteinhardtMay 5, 2025
  14. Junio C HamanoMay 5, 2025
  15. Patrick SteinhardtMay 6, 2025
  16. Johannes SchindelinMay 6, 2025
  17. Junio C HamanoMay 8, 2025

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.