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

Re: [PATCH v3 2/2] tests(mingw): avoid very slow `mingw_test_cmp`

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 19, 2022, 12:03 UTC
Message-ID
<221119.86sfifdu4n.gmgdl@evledraar.gmail.com>
In-Reply-To
<Y3hFITt+8VUubC8v@nand.local>
On Fri, Nov 18 2022, Taylor Blau wrote:
Show 18 quoted lines
> On Fri, Nov 18, 2022 at 03:15:08PM -0800, Junio C Hamano wrote:
>> Taylor Blau <me@ttaylorr.com> writes:
>>
>> > One thing that the commit message doesn't allude to (that is covered in
>> > the earlier discussion) is why it is important to pass
>> > `--ignore-cr-at-eol`. I think that is worth mentioning here.
>>
>> Isn't it because Git on the platform is expected to use CRLF in
>> certain places, unlike on other platforms where LF is used, but the
>> platform port hasn't adjusted tests to match that expectation?  And
>> vice versa, where Git is expected to produce LF terminated text
>> everywhere but the expected output is not "ported" to force LF
>> termination and instead produces CRLF terminated text on platforms
>> whose native line ending is CRLF?
>
> Yes, I think that's right. My suggestion to Johannes was to (a) make
> sure that your and my understanding is correct, and (b) to memorialize
> that understanding in the commit message itself.

It's not right, but mostly right. I.e. the "--ignore-cr-at-eol" is surely needed to avoid a deluge of errors on Windows, but as I noted in [1] you'll also find that the tests don't pass on a *nix box without it.

Which is apparently because "--ignore-cr-at-eol" is also conflating "is binary?" with "should I replace \r\n", or something.

Show 9 quoted lines
>> Use of "ignore-cr-at-eol" may allow such tests that are not ported
>> correctly to prepare expected output with a "wrong" line ending and
>> still pass, and I do think it may be an expedite way to make tests
>> appear to pass.
>>
>> But I worry that it may not be a good thing for the health of the
>> Windows port in the longer term.
>
> I share your concerns, too.

I don't really care about that, and would tend to defer to one or more Johannes in this thread on that question.

But as noted in [1] the upthread patch seems to be replacing some existing newline munging with not-quite-the-same "diff" behavior.

Which I think is something that needs addressing, either by the commit explaining why that's desired & OK.

Which is also a good reason to pick one of our *nix CI jobs and run it with "git diff --no-index", but without "--ignore-cr-at-eol", as I suggested. It would tease out exactly that difference, both for current and future tests.

1. https://lore.kernel.org/git/221114.86pmdplbs5.gmgdl@evledraar.gmail.com/
Previous: Taylor BlauNext: Johannes Sixt
Message 28 of 58 in “tests: replace mingw_test_cmp with a helper in C”
  1. tests: replace mingw_test_cmp with a helper in CJohannes Schindelin via GitGitGadget, Jul 29, 2022
  2. Johannes SchindelinJul 29, 2022
  3. Junio C HamanoJul 29, 2022
  4. Johannes SchindelinSep 6, 2022
  5. René ScharfeSep 7, 2022
  6. Junio C HamanoSep 7, 2022
  7. Re* [PATCH] tests: replace mingw_test_cmp with a helper in CJunio C Hamano, Sep 7, 2022
  8. René ScharfeSep 7, 2022
  9. Junio C HamanoSep 8, 2022
  10. René ScharfeSep 8, 2022
  11. Ævar Arnfjörð BjarmasonSep 8, 2022
  12. Johannes SchindelinSep 8, 2022
  13. Junio C HamanoSep 8, 2022
  14. 0/2 tests: replace mingw_test_cmp with a helper in CJohannes Schindelin via GitGitGadget, Sep 6, 2022
  15. 1/2 t0021: use Windows-friendly `pwd`Johannes Schindelin via GitGitGadget, Sep 6, 2022
  16. 2/2 tests: replace mingw_test_cmp with a helper in CJohannes Schindelin via GitGitGadget, Sep 6, 2022
  17. Ævar Arnfjörð BjarmasonSep 7, 2022
  18. Ævar Arnfjörð BjarmasonSep 7, 2022
  19. Junio C HamanoSep 7, 2022
  20. Johannes SchindelinSep 7, 2022
  21. 0/2 tests: replace mingw_test_cmp with a helper in CJohannes Schindelin via GitGitGadget, Nov 12, 2022
  22. 1/2 t0021: use Windows-friendly `pwd`Johannes Schindelin via GitGitGadget, Nov 12, 2022
  23. 2/2 tests(mingw): avoid very slow `mingw_test_cmp`Johannes Schindelin via GitGitGadget, Nov 12, 2022
  24. Taylor BlauNov 13, 2022
  25. Johannes SchindelinNov 14, 2022
  26. Junio C HamanoNov 18, 2022
  27. Taylor BlauNov 19, 2022
  28. Ævar Arnfjörð BjarmasonNov 19, 2022
  29. Johannes SixtNov 19, 2022
  30. René ScharfeNov 19, 2022
  31. Torsten BögershausenNov 20, 2022
  32. Johannes SixtNov 21, 2022
  33. Junio C HamanoNov 21, 2022
  34. Phillip WoodNov 14, 2022
  35. Johannes SchindelinNov 14, 2022
  36. Ævar Arnfjörð BjarmasonNov 14, 2022
  37. Johannes SchindelinNov 14, 2022
  38. Ævar Arnfjörð BjarmasonNov 14, 2022
  39. Junio C HamanoNov 18, 2022
  40. Taylor BlauNov 19, 2022
  41. Ævar Arnfjörð BjarmasonNov 19, 2022
  42. Junio C HamanoNov 21, 2022
  43. 0/2 tests(mingw): avoid super-slow mingw_test_cmpJohannes Schindelin via GitGitGadget, Nov 14, 2022
  44. 1/2 t0021: use Windows-friendly `pwd`Johannes Schindelin via GitGitGadget, Nov 14, 2022
  45. 2/2 tests(mingw): avoid very slow `mingw_test_cmp`Johannes Schindelin via GitGitGadget, Nov 14, 2022
  46. Taylor BlauNov 14, 2022
  47. Johannes SchindelinNov 18, 2022
  48. Taylor BlauNov 18, 2022
  49. Johannes SchindelinNov 20, 2022
  50. Taylor BlauNov 21, 2022
  51. 0/2 tests(mingw): avoid super-slow mingw_test_cmpJohannes Schindelin via GitGitGadget, Dec 6, 2022
  52. 2/2 tests(mingw): avoid very slow `mingw_test_cmp`Johannes Schindelin via GitGitGadget, Dec 6, 2022
  53. Ævar Arnfjörð BjarmasonDec 6, 2022
  54. Johannes SixtDec 6, 2022
  55. René ScharfeDec 6, 2022
  56. Junio C HamanoDec 7, 2022
  57. Taylor BlauDec 7, 2022
  58. 1/2 t0021: use Windows-friendly `pwd`Johannes Schindelin via GitGitGadget, Dec 6, 2022

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.