All of lore.kernel.org
 help / color / mirror / Atom feed
* Failing tests in t0027-autocrlf.sh under msysgit/git-win-sdk
@ 2014-10-02 12:39 Thomas Braun
  2014-10-02 13:42 ` Torsten Bögershausen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Braun @ 2014-10-02 12:39 UTC (permalink / raw)
  To: GIT Mailing-list; +Cc: git-win-sdk

Hi,

I've enabled EXPENSIVE and ran the git test suite under msysgit/git-win-sdk with
git version 2.1.0.9753.g360f311.dirty.

Now I have some failing tests in t0027-autocrlf.sh in the MINGW only section which puzzle me.

The offending test sets are

diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
index 72dd3e8..90c4cd1 100755
--- a/t/t0027-auto-crlf.sh
+++ b/t/t0027-auto-crlf.sh
@@ -245,18 +245,18 @@ if test_have_prereq MINGW
 then
 check_files_in_ws ""      false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
 check_files_in_ws ""      true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
-check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
+# check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # first broken
 check_files_in_ws ""      true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
-check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
+# check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
 check_files_in_ws ""      true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
 check_files_in_ws ""      false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
 check_files_in_ws ""      true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
 
 check_files_in_ws native  false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
 check_files_in_ws native  true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
-check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
+# check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
 check_files_in_ws native  true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
-check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
+# check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
 check_files_in_ws native  true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
 check_files_in_ws native  false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
 check_files_in_ws native  true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul

I tried with NATIVE_CRLF = YesPlease but 117 failed too.

First question, under what MINGW system do these tests pass?
Second question any hints how to tackle this?

The first failing test is
not ok 117 - checkout core.eol= core.autocrlf=false gitattributes=auto file=LF
#
#                       compare_ws_file eol__crlf_false_attr_auto_ LF    crlf_false_attr__LF.txt
#


where I have in the trash directory

$ diff -Nur *expect* *actual*
--- LF.expect   2014-10-02 12:15:17 +0000
+++ eol__crlf_false_attr_auto_.actual.crlf_false_attr__LF.txt   2014-10-02 12:15
:17 +0000
@@ -1,3 +1,3 @@
-0000000   l   i   n   e   1  \n   l   i   n   e   2  \n   l   i   n   e
-0000020   3
-0000021
+0000000   l   i   n   e   1  \r  \n   l   i   n   e   2  \r  \n   l   i
+0000020   n   e   3
+0000023

Reading convert.h tells me that for undefined NATIVE_CRLF the native EOL is LF.
Which looks like the test is correct.

Thomas

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Failing tests in t0027-autocrlf.sh under msysgit/git-win-sdk
  2014-10-02 12:39 Failing tests in t0027-autocrlf.sh under msysgit/git-win-sdk Thomas Braun
@ 2014-10-02 13:42 ` Torsten Bögershausen
  2014-10-02 14:14   ` Thomas Braun
  0 siblings, 1 reply; 3+ messages in thread
From: Torsten Bögershausen @ 2014-10-02 13:42 UTC (permalink / raw)
  To: Thomas Braun, GIT Mailing-list; +Cc: git-win-sdk

On 2014-10-02 14.39, Thomas Braun wrote:
> Hi,
> 
> I've enabled EXPENSIVE and ran the git test suite under msysgit/git-win-sdk with
> git version 2.1.0.9753.g360f311.dirty.
> 
> Now I have some failing tests in t0027-autocrlf.sh in the MINGW only section which puzzle me.
> 
> The offending test sets are
> 
> diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
> index 72dd3e8..90c4cd1 100755
> --- a/t/t0027-auto-crlf.sh
> +++ b/t/t0027-auto-crlf.sh
> @@ -245,18 +245,18 @@ if test_have_prereq MINGW
>  then
>  check_files_in_ws ""      false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>  check_files_in_ws ""      true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> -check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> +# check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # first broken

>  check_files_in_ws ""      true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
> -check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> +# check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>  check_files_in_ws ""      true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
>  check_files_in_ws ""      false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>  check_files_in_ws ""      true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>  
>  check_files_in_ws native  false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>  check_files_in_ws native  true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> -check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> +# check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>  check_files_in_ws native  true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
> -check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> +# check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>  check_files_in_ws native  true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
>  check_files_in_ws native  false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>  check_files_in_ws native  true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
> 
> I tried with NATIVE_CRLF = YesPlease but 117 failed too.
> 
> First question, under what MINGW system do these tests pass?
> Second question any hints how to tackle this?

> 
> The first failing test is
> not ok 117 - checkout core.eol= core.autocrlf=false gitattributes=auto file=LF
> #
> #                       compare_ws_file eol__crlf_false_attr_auto_ LF    crlf_false_attr__LF.txt
> #
> 
> 
> where I have in the trash directory
> 
> $ diff -Nur *expect* *actual*
> --- LF.expect   2014-10-02 12:15:17 +0000
> +++ eol__crlf_false_attr_auto_.actual.crlf_false_attr__LF.txt   2014-10-02 12:15

First things first:
We have a file with LF in the repo, and check it out.

Read it like this:
"eol__crlf_false_attr_auto_.actual"
                 ^ *.txt auto in .gitconfig   
      ^
      core.autocrlf is false 
  ^
  core.eol is unset

The file is expected to have LF in the working tree, but has CRLF

> :17 +0000
> @@ -1,3 +1,3 @@
> -0000000   l   i   n   e   1  \n   l   i   n   e   2  \n   l   i   n   e
> -0000020   3
> -0000021
> +0000000   l   i   n   e   1  \r  \n   l   i   n   e   2  \r  \n   l   i
> +0000020   n   e   3
> +0000023
> 
> Reading convert.h tells me that for undefined NATIVE_CRLF the native EOL is LF.
> Which looks like the test is correct.
> 
> Thomas
> 
Which version of t0027 do you have:
The latest version in git.git is this one,
and "should pass" (but I may have missed something)

commit f6975a6b119128de1c5a89e6cd64f75ed1de2177
Author: Torsten Bögershausen <tboegi@web.de>
Date:   Sat Aug 16 22:16:58 2014 +0200

    t0027: Tests for core.eol=native, eol=lf, eol=crlf
    
    Add test cases for core.eol "native" and "" (unset).
    (MINGW uses CRLF, all other systems LF as native line endings)
    
    Add test cases for the attributes "eol=lf" and "eol=crlf"
    
    Other minor changes:
    - Use the more portable 'tr' instead of 'od -c' to convert '\n' into 'Q'
      and '\0' into 'N'
    - Style fixes for shell functions according to the coding guide lines
    - Replace "txtbin" with "attr"
    
    Signed-off-by: Torsten Bögershausen <tboegi@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Failing tests in t0027-autocrlf.sh under msysgit/git-win-sdk
  2014-10-02 13:42 ` Torsten Bögershausen
@ 2014-10-02 14:14   ` Thomas Braun
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Braun @ 2014-10-02 14:14 UTC (permalink / raw)
  To: Torsten Bögershausen, GIT Mailing-list; +Cc: git-win-sdk

Am 02.10.2014 um 15:42 schrieb Torsten Bögershausen:
> On 2014-10-02 14.39, Thomas Braun wrote:
>> Hi,
>>
>> I've enabled EXPENSIVE and ran the git test suite under msysgit/git-win-sdk with
>> git version 2.1.0.9753.g360f311.dirty.
>>
>> Now I have some failing tests in t0027-autocrlf.sh in the MINGW only section which puzzle me.
>>
>> The offending test sets are
>>
>> diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
>> index 72dd3e8..90c4cd1 100755
>> --- a/t/t0027-auto-crlf.sh
>> +++ b/t/t0027-auto-crlf.sh
>> @@ -245,18 +245,18 @@ if test_have_prereq MINGW
>>  then
>>  check_files_in_ws ""      false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>  check_files_in_ws ""      true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> -check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> +# check_files_in_ws ""      false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # first broken
> 
>>  check_files_in_ws ""      true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
>> -check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> +# check_files_in_ws ""      false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>>  check_files_in_ws ""      true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
>>  check_files_in_ws ""      false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>  check_files_in_ws ""      true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>  
>>  check_files_in_ws native  false ""        LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>  check_files_in_ws native  true  ""        CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> -check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> +# check_files_in_ws native  false "auto"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>>  check_files_in_ws native  true  "auto"    CRLF  CRLF  CRLF         LF_mix_CR    CRLF_nul
>> -check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>> +# check_files_in_ws native  false "text"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul # broken
>>  check_files_in_ws native  true  "text"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul
>>  check_files_in_ws native  false "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>  check_files_in_ws native  true  "-text"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul
>>
>> I tried with NATIVE_CRLF = YesPlease but 117 failed too.
>>
>> First question, under what MINGW system do these tests pass?
>> Second question any hints how to tackle this?
> 
>>
>> The first failing test is
>> not ok 117 - checkout core.eol= core.autocrlf=false gitattributes=auto file=LF
>> #
>> #                       compare_ws_file eol__crlf_false_attr_auto_ LF    crlf_false_attr__LF.txt
>> #
>>
>>
>> where I have in the trash directory
>>
>> $ diff -Nur *expect* *actual*
>> --- LF.expect   2014-10-02 12:15:17 +0000
>> +++ eol__crlf_false_attr_auto_.actual.crlf_false_attr__LF.txt   2014-10-02 12:15
> 
> First things first:
> We have a file with LF in the repo, and check it out.
> 
> Read it like this:
> "eol__crlf_false_attr_auto_.actual"
>                  ^ *.txt auto in .gitconfig   
>       ^
>       core.autocrlf is false 
>   ^
>   core.eol is unset

Thanks for the explanation.

> The file is expected to have LF in the working tree, but has CRLF
> 
>> :17 +0000
>> @@ -1,3 +1,3 @@
>> -0000000   l   i   n   e   1  \n   l   i   n   e   2  \n   l   i   n   e
>> -0000020   3
>> -0000021
>> +0000000   l   i   n   e   1  \r  \n   l   i   n   e   2  \r  \n   l   i
>> +0000020   n   e   3
>> +0000023
>>
>> Reading convert.h tells me that for undefined NATIVE_CRLF the native EOL is LF.
>> Which looks like the test is correct.
>>
>> Thomas
>>
> Which version of t0027 do you have:
> The latest version in git.git is this one,
> and "should pass" (but I may have missed something)
> 
> commit f6975a6b119128de1c5a89e6cd64f75ed1de2177
> Author: Torsten Bögershausen <tboegi@web.de>
> Date:   Sat Aug 16 22:16:58 2014 +0200
> 
>     t0027: Tests for core.eol=native, eol=lf, eol=crlf
>     
>     Add test cases for core.eol "native" and "" (unset).
>     (MINGW uses CRLF, all other systems LF as native line endings)
>     
>     Add test cases for the attributes "eol=lf" and "eol=crlf"
>     
>     Other minor changes:
>     - Use the more portable 'tr' instead of 'od -c' to convert '\n' into 'Q'
>       and '\0' into 'N'
>     - Style fixes for shell functions according to the coding guide lines
>     - Replace "txtbin" with "attr"
>     
>     Signed-off-by: Torsten Bögershausen <tboegi@web.de>
>     Signed-off-by: Junio C Hamano <gitster@pobox.com>

Correct guess! I've been testing the original version 343151dc (t0027:
combinations of core.autocrlf, core.eol and text, 2014-07-08).
f6975a6 of t0027-autocrlf.sh passes now completely.

Thanks for the quick reply.

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-02 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 12:39 Failing tests in t0027-autocrlf.sh under msysgit/git-win-sdk Thomas Braun
2014-10-02 13:42 ` Torsten Bögershausen
2014-10-02 14:14   ` Thomas Braun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.