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

Re: t0025 flaky on OSX

From
Torsten Bögershausen <tboegi@web.de>
Date
Apr 24, 2017, 19:48 UTC
Message-ID
<11da00e8-a62c-bf07-d97e-ab755647082b@web.de>
In-Reply-To
<e6343f94-3fad-e323-cb38-8ea1148cec3f@web.de>
On 2017-04-24 19:00, Torsten Bögershausen wrote:
Show 12 quoted lines
> On 2017-04-24 18:45, Lars Schneider wrote:
>> Hi,
>>
>> "t0025.3 - crlf=true causes a CRLF file to be normalized" failed 
>> sporadically on next and master recently: 
>> https://travis-ci.org/git/git/jobs/225084459#L2382
>> https://travis-ci.org/git/git/jobs/223830505#L2342
>>
>> Are you aware of a race condition in the code
>> or in the test?
> Not yet - I'll have a look
> 

So, The test failed under Linux & pu of the day, using Peff's stress script.

not ok 3 - crlf=true causes a CRLF file to be normalized
The good case (simplified):
$ git status
   modified:   CRLFonly
Untracked files:
        .gitattributes

$ git diff | tr "\015" Q warning: CRLF will be replaced by LF in CRLFonly. The file will have its original line endings in your working directory.

diff --git a/CRLFonly b/CRLFonly
index 44fc21c..666dbf4 100644
--- a/CRLFonly
+++ b/CRLFonly
@@ -1,7 +1,7 @@
-IQ
-amQ
-veryQ
-veryQ
-fineQ
-thankQ
-youQ
+I
+am
+very
+very
+fine
+thank
+you

--------------------
The failed case:
$ git status
Untracked files:
        .gitattributes

-----------------------
$ ls -al -i
total 28
3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 .
3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..
3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 CRLFonly
3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:27 .git
3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes
3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly
3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL

-----------------
#After
$ mv CRLFonly tmp
$ cp tmp CRLFonly
$ ls -al -i
3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:36 .
3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..
3401599 -rw-r--r-- 1 tb tb   37 Apr 24 21:36 CRLFonly
3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:36 .git
3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes
3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly
3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL
3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 tmp

$ git status
	modified:   CRLFonly
Untracked files:
        .gitattributes
        tmp


So all in all it seams as if there is a very old race condition here,
which we "never" have seen yet.
Moving the file to a different inode number fixes the test case,
Git doesn't treat it as unchanged any more.
Previous: Torsten BögershausenNext: Lars Schneider
Message 2 of 16 in “Re: t0025 flaky on OSX”
  1. Torsten BögershausenApr 24, 2017
  2. Torsten BögershausenApr 24, 2017
  3. Lars SchneiderApr 25, 2017
  4. Torsten BögershausenApr 26, 2017
  5. Lars SchneiderApr 26, 2017
  6. 1/1 t0027: Some tests are not expensivetboegi@web.de, Apr 29, 2017
  7. Junio C HamanoMay 1, 2017
  8. Torsten BögershausenMay 1, 2017
  9. 1/1 t0027: tests are not expensive; remove t0025tboegi@web.de, May 2, 2017
  10. Johannes SchindelinMay 2, 2017
  11. Junio C HamanoMay 9, 2017
  12. Torsten BögershausenMay 9, 2017
  13. 1/1 t0027: tests are not expensive; remove t0025tboegi@web.de, May 10, 2017
  14. Johannes SchindelinMay 10, 2017
  15. Torstem BögershausenMay 10, 2017
  16. Junio C HamanoMay 11, 2017

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.