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

Re: t0027 racy?

From
Torsten Bögershausen <tboegi@web.de>
Date
Aug 8, 2016, 20:32 UTC
Message-ID
<20160808203224.GA28431@tb-raspi>
In-Reply-To
<20160808152926.mciovipy5qlnqegs@sigill.intra.peff.net>
On Mon, Aug 08, 2016 at 11:29:26AM -0400, Jeff King wrote:
Show 36 quoted lines
> On Mon, Aug 08, 2016 at 05:05:07PM +0200, Johannes Schindelin wrote:
> 
> > I remember that you did a ton of work on t0027. Now I see problems, and
> > not only that the entire script now takes a whopping 4 minutes 20 seconds
> > to run on my high-end Windows machine.
> > 
> > It appears that t0027 fails randomly for me, in seemingly random places.
> > Sometimes all 1388 cases pass. Sometimes "29 - commit NNO files crlf=true
> > attr=auto LF" fails. Sometimes it is "24 - commit NNO files crlf=false
> > attr=auto LF". Sometimes it is "114 - commit NNO files crlf=false
> > attr=auto LF", and sometimes "111 - commit NNO files attr=auto aeol=lf
> > crlf=false CRLF_mix_LF".
> > 
> > When I run it with -i -v -x --tee, it passes every single time (taking
> > over 5 minutes, just to make things worse)...
> > 
> > Any idea about any possible races?
> 
> Try:
> 
>   https://github.com/peff/git/blob/meta/stress
> 
> which you can run as "sh /path/to/stress t0027" in the top-level of your
> git repository. I got failure within about 30 seconds on t0027 (though 5
> minutes? Yeesh. It runs in 9s on my laptop. I weep for you).
> 
> The verbose output is not very exciting, though:
> 
> 	expecting success: 
> 	                check_warning "$lfwarn" ${pfx}_LF.err
> 
> 	--- NNO_attr_auto_aeol_crlf_false_LF.err.expect 2016-08-08 15:26:37.061701392 +0000
> 	+++ NNO_attr_auto_aeol_crlf_false_LF.err.actual 2016-08-08 15:26:37.061701392 +0000
> 	@@ -1 +0,0 @@
> 	-warning: LF will be replaced by CRLF
> 	not ok 114 - commit NNO files crlf=false attr=auto LF
(I realized that t0027 is not yet self-explaining, I have it on my list)
NNO_attr_auto_aeol_crlf_false_LF means:
NNO:           "Not NOrmalized" A file had been commited with CRLF in the repo
attr_auto:     .gitattributes has "* text=auto"
aeol_eol       .gitattributes has "eol=crlf"
crlf_false     git config core.autocrlf = false
LF             We commit a file with LF line endings.
This should happend:
- The file is commited "as is", with LF line endings.
- While commiting, git should print the warning
- "warning: LF will be replaced by CRLF" to stderr
- stderr is piped (redirected) into NNO_attr_auto_aeol_crlf_false_LF.err
- we grep for "will be replaced by" in xx.err and pipe it into xx.err.actual

The rest is test_cmp, this is what you see. The warning is missing, but should be there:

The file has LF, and after commit and a new checkout these LF will be convertet into CRLF.

So why isn't the warning there (but here on my oldish machines)
Previous: Jeff KingNext: Jeff King
Message 3 of 45 in “t0027 racy?”
  1. Johannes SchindelinAug 8, 2016
  2. Jeff KingAug 8, 2016
  3. Torsten BögershausenAug 8, 2016
  4. Jeff KingAug 9, 2016
  5. Jeff KingAug 9, 2016
  6. Johannes SchindelinAug 9, 2016
  7. Torsten BögershausenAug 9, 2016
  8. Jeff KingAug 9, 2016
  9. Torsten BögershausenAug 9, 2016
  10. Jeff KingAug 9, 2016
  11. Torsten BögershausenAug 9, 2016
  12. Johannes SchindelinAug 10, 2016
  13. Torsten BögershausenAug 11, 2016
  14. Junio C HamanoAug 11, 2016
  15. Jeff KingAug 12, 2016
  16. 0/2 Fix conversion warningstboegi@web.de, Aug 12, 2016
  17. 2/2 convert: missing `LF will be replaced by CRLFtboegi@web.de, Aug 12, 2016
  18. Junio C HamanoAug 12, 2016
  19. 1/2 t0027: Correct raciness in NNO testtboegi@web.de, Aug 12, 2016
  20. Junio C HamanoAug 12, 2016
  21. Johannes SixtAug 13, 2016
  22. Torsten BögershausenAug 13, 2016
  23. Junio C HamanoAug 14, 2016
  24. 1/1 convert: Correct NNO tests and missing `LF will be replaced by CRLF`tboegi@web.de, Aug 13, 2016
  25. 0/1 convert: Correct NNO tests and missing `LF will be replaced by CRLF`tboegi@web.de, Aug 13, 2016
  26. Johannes SchindelinAug 17, 2016
  27. 0/1 Rename NotNormalized (NNO) into CRLF in indextboegi@web.de, Aug 19, 2016
  28. Junio C HamanoAug 19, 2016
  29. 1/1 t0027: Rename NotNormalized (NNO) into CRLF in indextboegi@web.de, Aug 19, 2016
  30. 1/2 git ls-files: text=auto eol=lf is supported in Git 2.10tboegi@web.de, Aug 25, 2016
  31. Junio C HamanoAug 25, 2016
  32. 0/3 Update eol documentationtboegi@web.de, Aug 25, 2016
  33. Junio C HamanoAug 25, 2016
  34. Jacob KellerAug 26, 2016
  35. Torsten BögershausenAug 26, 2016
  36. 2/2 gitattributes: Document the unified "auto" handlingtboegi@web.de, Aug 25, 2016
  37. Junio C HamanoAug 25, 2016
  38. 0/2 Adjust the documentation to the unified "auto" handlingtboegi@web.de, Aug 26, 2016
  39. 1/2 git ls-files: text=auto eol=lf is supported in Git 2.10tboegi@web.de, Aug 26, 2016
  40. 2/2 gitattributes: Document the unified "auto" handlingtboegi@web.de, Aug 26, 2016
  41. Junio C HamanoAug 26, 2016
  42. Johannes SchindelinAug 9, 2016
  43. Jeff KingAug 9, 2016
  44. Torsten BögershausenAug 8, 2016
  45. Johannes SchindelinAug 9, 2016

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.