{"thread":{"id":"45787","subject":"Re: t0025 flaky on OSX","startedAt":"2017-04-24T17:01:25Z","lastAt":"2017-05-11T02:17:16Z","messageCount":16,"participants":["Torsten Bögershausen","Lars Schneider","tboegi@web.de","Junio C Hamano","Johannes Schindelin","Torstem Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"317700","messageId":"e6343f94-3fad-e323-cb38-8ea1148cec3f@web.de","threadId":"45787","inReplyTo":"461E433C-DC8E-42FE-9B23-4A76BEFE0D11@gmail.com","subject":"Re: t0025 flaky on OSX","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-04-24T17:00:59Z","receivedAt":"2017-04-24T17:01:25Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2017-04-24 18:45, Lars Schneider wrote:\n> Hi,\n> \n> \"t0025.3 - crlf=true causes a CRLF file to be normalized\" failed \n> sporadically on next and master recently: \n> https://travis-ci.org/git/git/jobs/225084459#L2382\n> https://travis-ci.org/git/git/jobs/223830505#L2342\n> \n> Are you aware of a race condition in the code\n> or in the test?\nNot yet - I'll have a look\n\n\n"},{"id":"317713","messageId":"11da00e8-a62c-bf07-d97e-ab755647082b@web.de","threadId":"45787","inReplyTo":"e6343f94-3fad-e323-cb38-8ea1148cec3f@web.de","subject":"Re: t0025 flaky on OSX","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-04-24T19:48:30Z","receivedAt":"2017-04-24T19:48:40Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2017-04-24 19:00, Torsten Bögershausen wrote:\n> On 2017-04-24 18:45, Lars Schneider wrote:\n>> Hi,\n>>\n>> \"t0025.3 - crlf=true causes a CRLF file to be normalized\" failed \n>> sporadically on next and master recently: \n>> https://travis-ci.org/git/git/jobs/225084459#L2382\n>> https://travis-ci.org/git/git/jobs/223830505#L2342\n>>\n>> Are you aware of a race condition in the code\n>> or in the test?\n> Not yet - I'll have a look\n> \n\nSo,\nThe test failed under Linux & pu of the day, using Peff's\nstress script.\n\nnot ok 3 - crlf=true causes a CRLF file to be normalized\n\nThe good case (simplified):\n$ git status\n   modified:   CRLFonly\n\nUntracked files:\n        .gitattributes\n\n\n$ git diff | tr \"\\015\" Q\nwarning: CRLF will be replaced by LF in CRLFonly.\nThe file will have its original line endings in your working directory.\ndiff --git a/CRLFonly b/CRLFonly\nindex 44fc21c..666dbf4 100644\n--- a/CRLFonly\n+++ b/CRLFonly\n@@ -1,7 +1,7 @@\n-IQ\n-amQ\n-veryQ\n-veryQ\n-fineQ\n-thankQ\n-youQ\n+I\n+am\n+very\n+very\n+fine\n+thank\n+you\n\n--------------------\nThe failed case:\n$ git status\nUntracked files:\n        .gitattributes\n\n-----------------------\n$ ls -al -i\ntotal 28\n3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 .\n3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..\n3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 CRLFonly\n3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:27 .git\n3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes\n3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly\n3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL\n\n-----------------\n#After\n$ mv CRLFonly tmp\n$ cp tmp CRLFonly\n$ ls -al -i\n3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:36 .\n3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..\n3401599 -rw-r--r-- 1 tb tb   37 Apr 24 21:36 CRLFonly\n3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:36 .git\n3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes\n3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly\n3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL\n3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 tmp\n\n$ git status\n\tmodified:   CRLFonly\nUntracked files:\n        .gitattributes\n        tmp\n\n\nSo all in all it seams as if there is a very old race condition here,\nwhich we \"never\" have seen yet.\nMoving the file to a different inode number fixes the test case,\nGit doesn't treat it as unchanged any more.\n\n\n\n\n"},{"id":"317820","messageId":"7D9AE52B-6A2D-408B-855E-3988514AAC45@gmail.com","threadId":"45787","inReplyTo":"11da00e8-a62c-bf07-d97e-ab755647082b@web.de","subject":"Re: t0025 flaky on OSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2017-04-25T17:42:52Z","receivedAt":"2017-04-25T17:42:59Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 24 Apr 2017, at 21:48, Torsten Bögershausen <tboegi@web.de> wrote:\n> \n> On 2017-04-24 19:00, Torsten Bögershausen wrote:\n>> On 2017-04-24 18:45, Lars Schneider wrote:\n>>> Hi,\n>>> \n>>> \"t0025.3 - crlf=true causes a CRLF file to be normalized\" failed \n>>> sporadically on next and master recently: \n>>> https://travis-ci.org/git/git/jobs/225084459#L2382\n>>> https://travis-ci.org/git/git/jobs/223830505#L2342\n>>> \n>>> Are you aware of a race condition in the code\n>>> or in the test?\n>> Not yet - I'll have a look\n>> \n> \n> So,\n> The test failed under Linux & pu of the day, using Peff's\n> stress script.\n> \n> not ok 3 - crlf=true causes a CRLF file to be normalized\n> \n> The good case (simplified):\n> $ git status\n>   modified:   CRLFonly\n> \n> Untracked files:\n>        .gitattributes\n> \n> \n> $ git diff | tr \"\\015\" Q\n> warning: CRLF will be replaced by LF in CRLFonly.\n> The file will have its original line endings in your working directory.\n> diff --git a/CRLFonly b/CRLFonly\n> index 44fc21c..666dbf4 100644\n> --- a/CRLFonly\n> +++ b/CRLFonly\n> @@ -1,7 +1,7 @@\n> -IQ\n> -amQ\n> -veryQ\n> -veryQ\n> -fineQ\n> -thankQ\n> -youQ\n> +I\n> +am\n> +very\n> +very\n> +fine\n> +thank\n> +you\n> \n> --------------------\n> The failed case:\n> $ git status\n> Untracked files:\n>        .gitattributes\n> \n> -----------------------\n> $ ls -al -i\n> total 28\n> 3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 .\n> 3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..\n> 3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 CRLFonly\n> 3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:27 .git\n> 3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes\n> 3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly\n> 3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL\n> \n> -----------------\n> #After\n> $ mv CRLFonly tmp\n> $ cp tmp CRLFonly\n> $ ls -al -i\n> 3430195 drwxr-xr-x 3 tb tb 4096 Apr 24 21:36 .\n> 3427617 drwxr-xr-x 3 tb tb 4096 Apr 24 21:19 ..\n> 3401599 -rw-r--r-- 1 tb tb   37 Apr 24 21:36 CRLFonly\n> 3432574 drwxr-xr-x 8 tb tb 4096 Apr 24 21:36 .git\n> 3425599 -rw-r--r-- 1 tb tb   14 Apr 24 21:19 .gitattributes\n> 3430089 -rw-r--r-- 1 tb tb   24 Apr 24 21:19 LFonly\n> 3430174 -rw-r--r-- 1 tb tb   36 Apr 24 21:19 LFwithNUL\n> 3429958 -rw-r--r-- 1 tb tb   37 Apr 24 21:19 tmp\n> \n> $ git status\n> \tmodified:   CRLFonly\n> Untracked files:\n>        .gitattributes\n>        tmp\n> \n> \n> So all in all it seams as if there is a very old race condition here,\n> which we \"never\" have seen yet.\n> Moving the file to a different inode number fixes the test case,\n> Git doesn't treat it as unchanged any more.\n\nThanks a lot for investigating this! Would you mind posting the\nfix as patch?\n\nThanks,\nLars"},{"id":"317899","messageId":"72445da2-04eb-5d51-42f6-7e7fce4d4843@web.de","threadId":"45787","inReplyTo":"7D9AE52B-6A2D-408B-855E-3988514AAC45@gmail.com","subject":"Re: t0025 flaky on OSX","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-04-26T04:12:11Z","receivedAt":"2017-04-26T04:11:20Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"\n>>\n>> So all in all it seams as if there is a very old race condition here,\n>> which we \"never\" have seen yet.\n>> Moving the file to a different inode number fixes the test case,\n>> Git doesn't treat it as unchanged any more.\n>\n> Thanks a lot for investigating this! Would you mind posting the\n> fix as patch?\n\nThat's ongoing.\nTC #3 and #4 are fixable, but #5 resists to be cured so far.\nI think we need a touch and sleep or so, more the next days (or weeks)\n"},{"id":"317966","messageId":"3AF5FF19-F0C6-43D2-85F6-7716CF22FA6B@gmail.com","threadId":"45787","inReplyTo":"72445da2-04eb-5d51-42f6-7e7fce4d4843@web.de","subject":"Re: t0025 flaky on OSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2017-04-26T19:41:00Z","receivedAt":"2017-04-26T19:41:08Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 26 Apr 2017, at 06:12, Torsten Bögershausen <tboegi@web.de> wrote:\n> \n> \n>>> \n>>> So all in all it seams as if there is a very old race condition here,\n>>> which we \"never\" have seen yet.\n>>> Moving the file to a different inode number fixes the test case,\n>>> Git doesn't treat it as unchanged any more.\n>> \n>> Thanks a lot for investigating this! Would you mind posting the\n>> fix as patch?\n> \n> That's ongoing.\n> TC #3 and #4 are fixable, but #5 resists to be cured so far.\n> I think we need a touch and sleep or so, more the next days (or weeks)\n\nCool! Actually #3 seems to cause most of the trouble.\nTherefore I think a patch for #3 and #4 would already be valuable!\n\nThanks,\nLars"},{"id":"318240","messageId":"20170429153454.16879-1-tboegi@web.de","threadId":"45787","inReplyTo":"11da00e8-a62c-bf07-d97e-ab755647082b@web.de","subject":"[PATCH/RFC 1/1] t0027: Some tests are not expensive","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2017-04-29T15:34:54Z","receivedAt":"2017-04-29T15:41:22Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nThe purpose of t0027 is to test all CRLF related conversions at\n\"git checkout\" and \"git add\".\n\nRunning t0027 under Git for Windows takes 3-4 minutes, so the whole script\nhad been marked as \"EXPENSIVE\".\n\nThe source code for \"Git for Windows\" overrides this since 2014:\n\"t0027 is marked expensive, but really, for MinGW we want to run these\ntests always.\"\n\nRecent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\nlarsxschneider@gmail.com\n\nAll tests from t0025 are covered in t0027 as well, so that t0025 can be\nretired later.\n\nSplit the tests in t0027 into 2 groups: expensive and not expensive.\nExpensive are all tests which check the CRLF conversion warnings and\nall tests which activate the Git internal \"ident\" filter.\n\nAll other test are now run under all platforms, which allows to remove\nthe flaky t0025 in the next commit.\n\nThe execution time for the non-expansive part is 6..8 seconds under Linux,\nand 32 seconds under Mac Os X.\n\nRunning the \"expensive\" version roughly doubles the time.\n\nAnd in case you ask, things are not going significantly faster using a SSD\ninstead of a spinning disk.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\nPS: The removal of t0025 is not included (yet)\n---\n t/t0027-auto-crlf.sh | 100 ++++++++++++++++++++++++++++++---------------------\n 1 file changed, 59 insertions(+), 41 deletions(-)\n\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 90db54c..2c5aff6 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -4,10 +4,12 @@ test_description='CRLF conversion all combinations'\n \n . ./test-lib.sh\n \n-if ! test_have_prereq EXPENSIVE\n+if ! test_have_prereq EXPENSIVE && ! test_have_prereq MINGW\n then\n-\tskip_all=\"EXPENSIVE not set\"\n-\ttest_done\n+\tsay \"# EXPENSIVE or MINGW not set, skipping ident and warning tests\"\n+else\n+\tEXPENSIVE0027=t\n+\texport EXPENSIVE0027\n fi\n \n compare_files () {\n@@ -95,11 +97,14 @@ commit_check_warn () {\n \t\tgit -c core.autocrlf=$crlf add $fname 2>\"${pfx}_$f.err\"\n \tdone &&\n \tgit commit -m \"core.autocrlf $crlf\" &&\n-\tcheck_warning \"$lfname\" ${pfx}_LF.err &&\n-\tcheck_warning \"$crlfname\" ${pfx}_CRLF.err &&\n-\tcheck_warning \"$lfmixcrlf\" ${pfx}_CRLF_mix_LF.err &&\n-\tcheck_warning \"$lfmixcr\" ${pfx}_LF_mix_CR.err &&\n-\tcheck_warning \"$crlfnul\" ${pfx}_CRLF_nul.err\n+\tif test \"$EXPENSIVE0027\" = t\n+\tthen\n+\t\tcheck_warning \"$lfname\" ${pfx}_LF.err &&\n+\t\tcheck_warning \"$crlfname\" ${pfx}_CRLF.err &&\n+\t\tcheck_warning \"$lfmixcrlf\" ${pfx}_CRLF_mix_LF.err &&\n+\t\tcheck_warning \"$lfmixcr\" ${pfx}_LF_mix_CR.err &&\n+\t\tcheck_warning \"$crlfnul\" ${pfx}_CRLF_nul.err\n+\tfi\n }\n \n commit_chk_wrnNNO () {\n@@ -122,24 +127,27 @@ commit_chk_wrnNNO () {\n \t\tgit -c core.autocrlf=$crlf add $fname 2>\"${pfx}_$f.err\"\n \tdone\n \n-\ttest_expect_success \"commit NNO files crlf=$crlf attr=$attr LF\" '\n-\t\tcheck_warning \"$lfwarn\" ${pfx}_LF.err\n-\t'\n-\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF\" '\n-\t\tcheck_warning \"$crlfwarn\" ${pfx}_CRLF.err\n-\t'\n-\n-\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_mix_LF\" '\n-\t\tcheck_warning \"$lfmixcrlf\" ${pfx}_CRLF_mix_LF.err\n-\t'\n-\n-\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf LF_mix_cr\" '\n-\t\tcheck_warning \"$lfmixcr\" ${pfx}_LF_mix_CR.err\n-\t'\n-\n-\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_nul\" '\n-\t\tcheck_warning \"$crlfnul\" ${pfx}_CRLF_nul.err\n-\t'\n+\tif test \"$EXPENSIVE0027\" = t\n+\tthen\n+\t\ttest_expect_success \"commit NNO files crlf=$crlf attr=$attr LF\" '\n+\t\t\tcheck_warning \"$lfwarn\" ${pfx}_LF.err\n+\t\t'\n+\t\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF\" '\n+\t\t\tcheck_warning \"$crlfwarn\" ${pfx}_CRLF.err\n+\t\t'\n+\n+\t\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_mix_LF\" '\n+\t\t\tcheck_warning \"$lfmixcrlf\" ${pfx}_CRLF_mix_LF.err\n+\t\t'\n+\n+\t\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf LF_mix_cr\" '\n+\t\t\tcheck_warning \"$lfmixcr\" ${pfx}_LF_mix_CR.err\n+\t\t'\n+\n+\t\ttest_expect_success \"commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_nul\" '\n+\t\t\tcheck_warning \"$crlfnul\" ${pfx}_CRLF_nul.err\n+\t\t'\n+\tfi\n }\n \n stats_ascii () {\n@@ -250,21 +258,24 @@ checkout_files () {\n \t\tfi\n \tdone\n \n-\ttest_expect_success \"ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol\" '\n-\t\ttest_when_finished \"rm expect actual\" &&\n-\t\tsort <<-EOF >expect &&\n-\t\ti/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt\n-\t\ti/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt\n-\t\ti/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt\n-\t\ti/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt\n-\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt\n-\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt\n-\t\tEOF\n-\t\tgit ls-files --eol crlf_false_attr__* |\n-\t\tsed -e \"s/\t/ /g\" -e \"s/  */ /g\" |\n-\t\tsort >actual &&\n-\t\ttest_cmp expect actual\n-\t'\n+\tif test \"$EXPENSIVE0027\" = t\n+\tthen\n+\t\ttest_expect_success \"ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol\" '\n+\t\t\ttest_when_finished \"rm expect actual\" &&\n+\t\t\tsort <<-EOF >expect &&\n+\t\t\ti/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt\n+\t\t\ti/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt\n+\t\t\ti/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt\n+\t\t\ti/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt\n+\t\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt\n+\t\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt\n+\t\t\tEOF\n+\t\t\tgit ls-files --eol crlf_false_attr__* |\n+\t\t\tsed -e \"s/\t/ /g\" -e \"s/  */ /g\" |\n+\t\t\tsort >actual &&\n+\t\t\ttest_cmp expect actual\n+\t\t'\n+\t\tfi\n \ttest_expect_success \"checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=LF\" \"\n \t\tcompare_ws_file $pfx $lfname    crlf_false_attr__LF.txt\n \t\"\n@@ -494,6 +505,13 @@ export CRLF_MIX_LF_CR MIX NL\n # Same handling with and without ident\n for id in \"\" ident\n do\n+\tif ! test \"$EXPENSIVE0027\" = t\n+\tthen\n+\t\tif test \"$id\" = ident\n+\t\tthen\n+\t\t\tcontinue\n+\t\tfi\n+\tfi\n \tfor ceol in lf crlf native\n \tdo\n \t\tfor crlf in true false input\n-- \n2.10.0\n\n"},{"id":"318341","messageId":"xmqqfugpi8bk.fsf@gitster.mtv.corp.google.com","threadId":"45787","inReplyTo":"20170429153454.16879-1-tboegi@web.de","subject":"Re: [PATCH/RFC 1/1] t0027: Some tests are not expensive","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-01T03:07:11Z","receivedAt":"2017-05-01T03:07:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"tboegi@web.de writes:\n\n> From: Torsten Bögershausen <tboegi@web.de>\n> ...\n> The execution time for the non-expansive part is 6..8 seconds under Linux,\n> and 32 seconds under Mac Os X.\n>\n> Running the \"expensive\" version roughly doubles the time.\n\nHmph, perhaps none of these is truly expensive if that is the case?\nI am not talking about ~10 or ~30 seconds in absolute terms, but\nreacting to \"excluding the ones only halves the time.\"\n\nThe files used in the test vector seem to be all small.\nIs the expensiveness due to the fact that there are so many of them,\nand not due to some specific conversion being very slow?\n"},{"id":"318348","messageId":"f79dd912-f798-7fa3-e8d0-cf90aef53bd5@web.de","threadId":"45787","inReplyTo":"xmqqfugpi8bk.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH/RFC 1/1] t0027: Some tests are not expensive","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-05-01T04:52:03Z","receivedAt":"2017-05-01T04:51:31Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"\n\nOn 01/05/17 05:07, Junio C Hamano wrote:\n> tboegi@web.de writes:\n>\n>> From: Torsten Bögershausen <tboegi@web.de>\n>> ...\n>> The execution time for the non-expansive part is 6..8 seconds under Linux,\n>> and 32 seconds under Mac Os X.\n>>\n>> Running the \"expensive\" version roughly doubles the time.\n>\n> Hmph, perhaps none of these is truly expensive if that is the case?\n> I am not talking about ~10 or ~30 seconds in absolute terms, but\n> reacting to \"excluding the ones only halves the time.\"\n>\n> The files used in the test vector seem to be all small.\n\n> Is the expensiveness due to the fact that there are so many of them,\nYes\n\n> and not due to some specific conversion being very slow?\nYes\n\nThe easiest solution is probably to simply remove the EXPENSIVE\nprecondition from t0027 and run it always on all platforms.\nAt the same time t0025 can be removed.\nUnless somebody objects, I will send a V2 the next days.\n"},{"id":"318511","messageId":"20170502155631.24848-1-tboegi@web.de","threadId":"45787","inReplyTo":"11da00e8-a62c-bf07-d97e-ab755647082b@web.de","subject":"[PATCH v2 1/1] t0027: tests are not expensive; remove t0025","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2017-05-02T15:56:31Z","receivedAt":"2017-05-02T15:56:42Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nThe purpose of t0027 is to test all CRLF related conversions at\n\"git checkout\" and \"git add\".\n\nRunning t0027 under Git for Windows takes 3-4 minutes, so the whole script\nhad been marked as \"EXPENSIVE\".\n\nThe source code for \"Git for Windows\" overrides this since 2014:\n\"t0027 is marked expensive, but really, for MinGW we want to run these\ntests always.\"\n\nRecent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\nlarsxschneider@gmail.com\n\nAll tests from t0025 are covered in t0027 already, so that t0025 can be\nretiered:\nThe execution time for t0027 is 14 seconds under Linux,\nand 63 seconds under Mac Os X.\nAnd in case you ask, things are not going significantly faster using a SSD\ninstead of a spinning disk.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/t0025-crlf-auto.sh | 181 ---------------------------------------------------\n t/t0027-auto-crlf.sh |   6 --\n 2 files changed, 187 deletions(-)\n delete mode 100755 t/t0025-crlf-auto.sh\n\ndiff --git a/t/t0025-crlf-auto.sh b/t/t0025-crlf-auto.sh\ndeleted file mode 100755\nindex 89826c5..0000000\n--- a/t/t0025-crlf-auto.sh\n+++ /dev/null\n@@ -1,181 +0,0 @@\n-#!/bin/sh\n-\n-test_description='CRLF conversion'\n-\n-. ./test-lib.sh\n-\n-has_cr() {\n-\ttr '\\015' Q <\"$1\" | grep Q >/dev/null\n-}\n-\n-test_expect_success setup '\n-\n-\tgit config core.autocrlf false &&\n-\n-\tfor w in Hello world how are you; do echo $w; done >LFonly &&\n-\tfor w in I am very very fine thank you; do echo ${w}Q; done | q_to_cr >CRLFonly &&\n-\tfor w in Oh here is a QNUL byte how alarming; do echo ${w}; done | q_to_nul >LFwithNUL &&\n-\tgit add . &&\n-\n-\tgit commit -m initial &&\n-\n-\tLFonly=$(git rev-parse HEAD:LFonly) &&\n-\tCRLFonly=$(git rev-parse HEAD:CRLFonly) &&\n-\tLFwithNUL=$(git rev-parse HEAD:LFwithNUL) &&\n-\n-\techo happy.\n-'\n-\n-test_expect_success 'default settings cause no changes' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'crlf=true causes a CRLF file to be normalized' '\n-\n-\t# Backwards compatibility check\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"CRLFonly crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t# Note, \"normalized\" means that git will normalize it if added\n-\thas_cr CRLFonly &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\ttest -n \"$CRLFonlydiff\"\n-'\n-\n-test_expect_success 'text=true causes a CRLF file to be normalized' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"CRLFonly text\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t# Note, \"normalized\" means that git will normalize it if added\n-\thas_cr CRLFonly &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\ttest -n \"$CRLFonlydiff\"\n-'\n-\n-test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf false &&\n-\techo \"LFonly eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf input &&\n-\techo \"LFonly eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'eol=lf gives a normalized file LFs with autocrlf=true' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"LFonly eol=lf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'autocrlf=true does not normalize CRLF files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'text=auto, autocrlf=true does not normalize CRLF files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"* text=auto\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'text=auto, autocrlf=true does not normalize binary files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"* text=auto\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFwithNUL &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'eol=crlf _does_ normalize binary files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"LFwithNUL eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFwithNUL &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'prepare unnormalized' '\n-\t> .gitattributes &&\n-\tgit config core.autocrlf false &&\n-\tprintf \"LINEONE\\nLINETWO\\r\\n\"     >mixed &&\n-\tgit add mixed .gitattributes &&\n-\tgit commit -m \"Add mixed\" &&\n-\tgit ls-files --eol | egrep \"i/crlf\" &&\n-\tgit ls-files --eol | egrep \"i/mixed\"\n-'\n-\n-test_expect_success 'normalize unnormalized' '\n-\techo \"* text=auto\" >.gitattributes &&\n-\trm .git/index &&\n-\tgit add . &&\n-\tgit commit -m \"Introduce end-of-line normalization\" &&\n-\tgit ls-files --eol | tr \"\\\\t\" \" \" | sort >act &&\n-cat >exp <<EOF &&\n-i/-text w/-text attr/text=auto         LFwithNUL\n-i/lf    w/crlf  attr/text=auto         CRLFonly\n-i/lf    w/crlf  attr/text=auto         LFonly\n-i/lf    w/lf    attr/text=auto         .gitattributes\n-i/lf    w/mixed attr/text=auto         mixed\n-EOF\n-\ttest_cmp exp act\n-'\n-\n-test_done\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 90db54c..effc3db 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -4,12 +4,6 @@ test_description='CRLF conversion all combinations'\n \n . ./test-lib.sh\n \n-if ! test_have_prereq EXPENSIVE\n-then\n-\tskip_all=\"EXPENSIVE not set\"\n-\ttest_done\n-fi\n-\n compare_files () {\n \ttr '\\015\\000' QN <\"$1\" >\"$1\".expect &&\n \ttr '\\015\\000' QN <\"$2\" | tr -d 'Z' >\"$2\".actual &&\n-- \n2.10.0\n\n"},{"id":"318539","messageId":"alpine.DEB.2.20.1705021809340.3480@virtualbox","threadId":"45787","inReplyTo":"20170502155631.24848-1-tboegi@web.de","subject":"Re: [PATCH v2 1/1] t0027: tests are not expensive; remove t0025","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T16:11:11Z","receivedAt":"2017-05-02T16:11:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Bögi,\n\nOn Tue, 2 May 2017, tboegi@web.de wrote:\n\n> From: Torsten Bögershausen <tboegi@web.de>\n> \n> The purpose of t0027 is to test all CRLF related conversions at\n> \"git checkout\" and \"git add\".\n> \n> Running t0027 under Git for Windows takes 3-4 minutes, so the whole script\n> had been marked as \"EXPENSIVE\".\n> \n> The source code for \"Git for Windows\" overrides this since 2014:\n> \"t0027 is marked expensive, but really, for MinGW we want to run these\n> tests always.\"\n\nIndeed.\n\n> Recent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\n> larsxschneider@gmail.com\n> \n> All tests from t0025 are covered in t0027 already, so that t0025 can be\n> retiered:\n\ns/retiered/retired/\n\n> The execution time for t0027 is 14 seconds under Linux,\n> and 63 seconds under Mac Os X.\n> And in case you ask, things are not going significantly faster using a SSD\n> instead of a spinning disk.\n> \n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n\nThank you for this patch.\n\nApart from the tyop, would it be possible to fix the formatting to look\nless strange? (Unless you use this to transport a super-secret message\nsteganographically to an alien planet or some such, of course.)\n\nCiao,\nDscho"},{"id":"319132","messageId":"xmqq8tm67r89.fsf@gitster.mtv.corp.google.com","threadId":"45787","inReplyTo":"alpine.DEB.2.20.1705021809340.3480@virtualbox","subject":"Re: [PATCH v2 1/1] t0027: tests are not expensive; remove t0025","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-09T01:29:10Z","receivedAt":"2017-05-09T01:29:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> Recent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\n>> larsxschneider@gmail.com\n>> \n>> All tests from t0025 are covered in t0027 already, so that t0025 can be\n>> retiered:\n>\n> s/retiered/retired/\n>\n>> The execution time for t0027 is 14 seconds under Linux,\n>> and 63 seconds under Mac Os X.\n>> And in case you ask, things are not going significantly faster using a SSD\n>> instead of a spinning disk.\n>> \n>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n>\n> Thank you for this patch.\n>\n> Apart from the tyop, would it be possible to fix the formatting to look\n> less strange? (Unless you use this to transport a super-secret message\n> steganographically to an alien planet or some such, of course.)\n\nPing?\n\nThanks.\n"},{"id":"319164","messageId":"f1183dc1-e2e5-f189-2df5-e46ec8930faa@web.de","threadId":"45787","inReplyTo":"xmqq8tm67r89.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 1/1] t0027: tests are not expensive; remove t0025","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-05-09T04:12:16Z","receivedAt":"2017-05-09T04:11:50Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"\n\nOn 09/05/17 03:29, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n>>> Recent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\n>>> larsxschneider@gmail.com\n>>>\n>>> All tests from t0025 are covered in t0027 already, so that t0025 can be\n>>> retiered:\n>>\n>> s/retiered/retired/\n>>\n>>> The execution time for t0027 is 14 seconds under Linux,\n>>> and 63 seconds under Mac Os X.\n>>> And in case you ask, things are not going significantly faster using a SSD\n>>> instead of a spinning disk.\n>>>\n>>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n>>\n>> Thank you for this patch.\n>>\n>> Apart from the tyop, would it be possible to fix the formatting to look\n>> less strange? (Unless you use this to transport a super-secret message\n>> steganographically to an alien planet or some such, of course.)\n>\n> Ping?\n\nI didn't had the time to send a patch yet -\nso either you feel free to amend the commit message locally and queue\nthat - or I send a new version in  2 weeks.\n"},{"id":"319273","messageId":"20170510140619.22808-1-tboegi@web.de","threadId":"45787","inReplyTo":"11da00e8-a62c-bf07-d97e-ab755647082b@web.de","subject":"[PATCH v3 1/1] t0027: tests are not expensive; remove t0025","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2017-05-10T14:06:19Z","receivedAt":"2017-05-10T14:06:32Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nThe purpose of t0027 is to test all CRLF related conversions at \"git checkout\"\nand \"git add\".\n\nRunning t0027 under Git for Windows takes 3-4 minutes, so the whole script had\nbeen marked as \"EXPENSIVE\".\n\nThe source code for \"Git for Windows\" overrides this since 2014:\n\"t0027 is marked expensive, but really, for MinGW we want to run these\ntests always.\"\n\nRecent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\nlarsxschneider@gmail.com\n\nAll tests in t0025 are covered by t0027 already, so that t0025 can be retired.\nt0027 takes less than 14 seconds under Linux, and 63 seconds under Mac Os X,\nand this is more or less the same with a SSD or a spinning disk.\n\nAcked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/t0025-crlf-auto.sh | 181 ---------------------------------------------------\n t/t0027-auto-crlf.sh |   6 --\n 2 files changed, 187 deletions(-)\n delete mode 100755 t/t0025-crlf-auto.sh\n\ndiff --git a/t/t0025-crlf-auto.sh b/t/t0025-crlf-auto.sh\ndeleted file mode 100755\nindex 89826c5..0000000\n--- a/t/t0025-crlf-auto.sh\n+++ /dev/null\n@@ -1,181 +0,0 @@\n-#!/bin/sh\n-\n-test_description='CRLF conversion'\n-\n-. ./test-lib.sh\n-\n-has_cr() {\n-\ttr '\\015' Q <\"$1\" | grep Q >/dev/null\n-}\n-\n-test_expect_success setup '\n-\n-\tgit config core.autocrlf false &&\n-\n-\tfor w in Hello world how are you; do echo $w; done >LFonly &&\n-\tfor w in I am very very fine thank you; do echo ${w}Q; done | q_to_cr >CRLFonly &&\n-\tfor w in Oh here is a QNUL byte how alarming; do echo ${w}; done | q_to_nul >LFwithNUL &&\n-\tgit add . &&\n-\n-\tgit commit -m initial &&\n-\n-\tLFonly=$(git rev-parse HEAD:LFonly) &&\n-\tCRLFonly=$(git rev-parse HEAD:CRLFonly) &&\n-\tLFwithNUL=$(git rev-parse HEAD:LFwithNUL) &&\n-\n-\techo happy.\n-'\n-\n-test_expect_success 'default settings cause no changes' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'crlf=true causes a CRLF file to be normalized' '\n-\n-\t# Backwards compatibility check\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"CRLFonly crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t# Note, \"normalized\" means that git will normalize it if added\n-\thas_cr CRLFonly &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\ttest -n \"$CRLFonlydiff\"\n-'\n-\n-test_expect_success 'text=true causes a CRLF file to be normalized' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"CRLFonly text\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t# Note, \"normalized\" means that git will normalize it if added\n-\thas_cr CRLFonly &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\ttest -n \"$CRLFonlydiff\"\n-'\n-\n-test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf false &&\n-\techo \"LFonly eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf input &&\n-\techo \"LFonly eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'eol=lf gives a normalized file LFs with autocrlf=true' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"LFonly eol=lf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\ttest -z \"$LFonlydiff\"\n-'\n-\n-test_expect_success 'autocrlf=true does not normalize CRLF files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'text=auto, autocrlf=true does not normalize CRLF files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"* text=auto\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFonly &&\n-\thas_cr CRLFonly &&\n-\tLFonlydiff=$(git diff LFonly) &&\n-\tCRLFonlydiff=$(git diff CRLFonly) &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFonlydiff\" -a -z \"$CRLFonlydiff\" -a -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'text=auto, autocrlf=true does not normalize binary files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\tgit config core.autocrlf true &&\n-\techo \"* text=auto\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\t! has_cr LFwithNUL &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'eol=crlf _does_ normalize binary files' '\n-\n-\trm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&\n-\techo \"LFwithNUL eol=crlf\" > .gitattributes &&\n-\tgit read-tree --reset -u HEAD &&\n-\n-\thas_cr LFwithNUL &&\n-\tLFwithNULdiff=$(git diff LFwithNUL) &&\n-\ttest -z \"$LFwithNULdiff\"\n-'\n-\n-test_expect_success 'prepare unnormalized' '\n-\t> .gitattributes &&\n-\tgit config core.autocrlf false &&\n-\tprintf \"LINEONE\\nLINETWO\\r\\n\"     >mixed &&\n-\tgit add mixed .gitattributes &&\n-\tgit commit -m \"Add mixed\" &&\n-\tgit ls-files --eol | egrep \"i/crlf\" &&\n-\tgit ls-files --eol | egrep \"i/mixed\"\n-'\n-\n-test_expect_success 'normalize unnormalized' '\n-\techo \"* text=auto\" >.gitattributes &&\n-\trm .git/index &&\n-\tgit add . &&\n-\tgit commit -m \"Introduce end-of-line normalization\" &&\n-\tgit ls-files --eol | tr \"\\\\t\" \" \" | sort >act &&\n-cat >exp <<EOF &&\n-i/-text w/-text attr/text=auto         LFwithNUL\n-i/lf    w/crlf  attr/text=auto         CRLFonly\n-i/lf    w/crlf  attr/text=auto         LFonly\n-i/lf    w/lf    attr/text=auto         .gitattributes\n-i/lf    w/mixed attr/text=auto         mixed\n-EOF\n-\ttest_cmp exp act\n-'\n-\n-test_done\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 90db54c..effc3db 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -4,12 +4,6 @@ test_description='CRLF conversion all combinations'\n \n . ./test-lib.sh\n \n-if ! test_have_prereq EXPENSIVE\n-then\n-\tskip_all=\"EXPENSIVE not set\"\n-\ttest_done\n-fi\n-\n compare_files () {\n \ttr '\\015\\000' QN <\"$1\" >\"$1\".expect &&\n \ttr '\\015\\000' QN <\"$2\" | tr -d 'Z' >\"$2\".actual &&\n-- \n2.10.0\n\n"},{"id":"319275","messageId":"alpine.DEB.2.21.1.1705101746470.146734@virtualbox","threadId":"45787","inReplyTo":"20170510140619.22808-1-tboegi@web.de","subject":"Re: [PATCH v3 1/1] t0027: tests are not expensive; remove t0025","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-10T15:52:40Z","receivedAt":"2017-05-10T15:52:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 10 May 2017, tboegi@web.de wrote:\n\n> From: Torsten Bögershausen <tboegi@web.de>\n> \n> The purpose of t0027 is to test all CRLF related conversions at \"git checkout\"\n> and \"git add\".\n> \n> Running t0027 under Git for Windows takes 3-4 minutes, so the whole script had\n> been marked as \"EXPENSIVE\".\n> \n> The source code for \"Git for Windows\" overrides this since 2014:\n> \"t0027 is marked expensive, but really, for MinGW we want to run these\n> tests always.\"\n> \n> Recent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\n> larsxschneider@gmail.com\n> \n> All tests in t0025 are covered by t0027 already, so that t0025 can be retired.\n> t0027 takes less than 14 seconds under Linux, and 63 seconds under Mac Os X,\n> and this is more or less the same with a SSD or a spinning disk.\n> \n> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n\nThis is still formatted very awkwardly. How about this instead (I fixed\nthe formatting, reworded a little here and there, and fixed the order of\nthe footers)?\n\n-- snipsnap --\nFrom: Torsten Bögershausen <tboegi@web.de>\n\nThe purpose of t0027 is to test all CRLF related conversions at \"git\ncheckout\" and \"git add\".  Running t0027 under Git for Windows takes 3-4\nminutes, so the whole script had been marked as \"EXPENSIVE\".\n\nHowever, the \"Git for Windows\" fork overrides this since 2014: \"t0027\nis marked expensive, but really, for MinGW we want to run these tests\nalways.\"\n\nThe test seems not to be expensive on other platforms at all: it takes\nless than 14 seconds under Linux, and 63 seconds under Mac Os X, and\nthis is more or less the same with a SSD or a spinning disk.\n\nSo let's drop the \"EXPENSIVE\" prereq.\n\nWhile at it, retire t0025: Recent \"stress\" tests show that t0025 if\nflaky, reported by Lars Schneider <larsxschneider@gmail.com>, but all\ntests in t0025 are covered by t0027 already.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\nAcked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>"},{"id":"319294","messageId":"7BD61CA1-47DC-481D-8491-5945333C8E55@web.de","threadId":"45787","inReplyTo":"alpine.DEB.2.21.1.1705101746470.146734@virtualbox","subject":"Re: [PATCH v3 1/1] t0027: tests are not expensive; remove t0025","fromName":"Torstem Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-05-10T19:55:22Z","receivedAt":"2017-05-10T19:55:27Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Ok for me, thanks for helping out.\n\n\n\n> Am 10.05.2017 um 17:52 schrieb Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n> \n> Hi,\n> \n>> On Wed, 10 May 2017, tboegi@web.de wrote:\n>> \n>> From: Torsten Bögershausen <tboegi@web.de>\n>> \n>> The purpose of t0027 is to test all CRLF related conversions at \"git checkout\"\n>> and \"git add\".\n>> \n>> Running t0027 under Git for Windows takes 3-4 minutes, so the whole script had\n>> been marked as \"EXPENSIVE\".\n>> \n>> The source code for \"Git for Windows\" overrides this since 2014:\n>> \"t0027 is marked expensive, but really, for MinGW we want to run these\n>> tests always.\"\n>> \n>> Recent \"stress\" tests show that t0025 if flaky, reported by Lars Schneider,\n>> larsxschneider@gmail.com\n>> \n>> All tests in t0025 are covered by t0027 already, so that t0025 can be retired.\n>> t0027 takes less than 14 seconds under Linux, and 63 seconds under Mac Os X,\n>> and this is more or less the same with a SSD or a spinning disk.\n>> \n>> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n> \n> This is still formatted very awkwardly. How about this instead (I fixed\n> the formatting, reworded a little here and there, and fixed the order of\n> the footers)?\n> \n> -- snipsnap --\n> From: Torsten Bögershausen <tboegi@web.de>\n> \n> The purpose of t0027 is to test all CRLF related conversions at \"git\n> checkout\" and \"git add\".  Running t0027 under Git for Windows takes 3-4\n> minutes, so the whole script had been marked as \"EXPENSIVE\".\n> \n> However, the \"Git for Windows\" fork overrides this since 2014: \"t0027\n> is marked expensive, but really, for MinGW we want to run these tests\n> always.\"\n> \n> The test seems not to be expensive on other platforms at all: it takes\n> less than 14 seconds under Linux, and 63 seconds under Mac Os X, and\n> this is more or less the same with a SSD or a spinning disk.\n> \n> So let's drop the \"EXPENSIVE\" prereq.\n> \n> While at it, retire t0025: Recent \"stress\" tests show that t0025 if\n> flaky, reported by Lars Schneider <larsxschneider@gmail.com>, but all\n> tests in t0025 are covered by t0027 already.\n> \n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n"},{"id":"319310","messageId":"xmqqziekcf31.fsf@gitster.mtv.corp.google.com","threadId":"45787","inReplyTo":"7BD61CA1-47DC-481D-8491-5945333C8E55@web.de","subject":"Re: [PATCH v3 1/1] t0027: tests are not expensive; remove t0025","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-11T02:17:06Z","receivedAt":"2017-05-11T02:17:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torstem Bögershausen <tboegi@web.de> writes:\n\n>> Am 10.05.2017 um 17:52 schrieb Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n>> \n>>  ...\n>> While at it, retire t0025: Recent \"stress\" tests show that t0025 if\n>> flaky, reported by Lars Schneider <larsxschneider@gmail.com>, but all\n>> tests in t0025 are covered by t0027 already.\n>> \n>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n>> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>\n> Ok for me, thanks for helping out.\n\nI'll do a s/if flaky/is flaky/ and queue it.\n\nThanks, both.  \n\n"}]}