{"thread":{"id":"57352","subject":"[PATCH] t0051: use \"skip_all\" under !MINGW in single-test file","startedAt":"2022-02-01T20:35:56Z","lastAt":"2022-02-08T13:41:11Z","messageCount":6,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"447458","messageId":"patch-1.1-34ff968dcb8-20220201T203428Z-avarab@gmail.com","threadId":"57352","inReplyTo":null,"subject":"[PATCH] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-02-01T20:35:51Z","receivedAt":"2022-02-01T20:35:56Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a\nwindows named pipe, 2018-09-11) use the same \"skip_all\" pattern as an\nexisting Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB\nby default, 2018-10-30) uses.\n\nThis way TAP consumers like \"prove\" will show a nice summary when the\ntest is skipped, e.g.:\n\n    $ prove t0051-windows-named-pipe.sh\n    [...]\n    t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n    [...]\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nA trivial UX improvement for the \"prove\" output, so that we'll show a\nnotice in the same way as e.g. t0029-core-unsetenvvars.sh and\nt5580-unc-paths.sh do (which are both Windows-specific).\n\n t/t0051-windows-named-pipe.sh | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh\nindex 10ac92d2250..412f413360d 100755\n--- a/t/t0051-windows-named-pipe.sh\n+++ b/t/t0051-windows-named-pipe.sh\n@@ -3,8 +3,13 @@\n test_description='Windows named pipes'\n \n . ./test-lib.sh\n+if ! test_have_prereq MINGW\n+then\n+\tskip_all='skipping Windows-specific tests'\n+\ttest_done\n+fi\n \n-test_expect_success MINGW 'o_append write to named pipe' '\n+test_expect_success 'o_append write to named pipe' '\n \tGIT_TRACE=\"$(pwd)/expect\" git status >/dev/null 2>&1 &&\n \t{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&\n \tpid=$! &&\n-- \n2.35.0.913.g12b4baa2536\n\n"},{"id":"447469","messageId":"xmqq5ypycl7u.fsf@gitster.g","threadId":"57352","inReplyTo":"patch-1.1-34ff968dcb8-20220201T203428Z-avarab@gmail.com","subject":"Re: [PATCH] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-02-01T21:48:05Z","receivedAt":"2022-02-01T21:48:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a\n> windows named pipe, 2018-09-11) use the same \"skip_all\" pattern as an\n> existing Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB\n> by default, 2018-10-30) uses.\n>\n> This way TAP consumers like \"prove\" will show a nice summary when the\n> test is skipped, e.g.:\n\n... as opposed to?  A failure?  A different appearance of the log\nmessage?  Something else?\n\n>\n>     $ prove t0051-windows-named-pipe.sh\n>     [...]\n>     t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n>     [...]\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>\n> A trivial UX improvement for the \"prove\" output, so that we'll show a\n> notice in the same way as e.g. t0029-core-unsetenvvars.sh and\n> t5580-unc-paths.sh do (which are both Windows-specific).\n>\n>  t/t0051-windows-named-pipe.sh | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh\n> index 10ac92d2250..412f413360d 100755\n> --- a/t/t0051-windows-named-pipe.sh\n> +++ b/t/t0051-windows-named-pipe.sh\n> @@ -3,8 +3,13 @@\n>  test_description='Windows named pipes'\n>  \n>  . ./test-lib.sh\n> +if ! test_have_prereq MINGW\n> +then\n> +\tskip_all='skipping Windows-specific tests'\n> +\ttest_done\n> +fi\n>  \n> -test_expect_success MINGW 'o_append write to named pipe' '\n> +test_expect_success 'o_append write to named pipe' '\n>  \tGIT_TRACE=\"$(pwd)/expect\" git status >/dev/null 2>&1 &&\n>  \t{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&\n>  \tpid=$! &&\n"},{"id":"447554","messageId":"220202.86zgn96oip.gmgdl@evledraar.gmail.com","threadId":"57352","inReplyTo":"xmqq5ypycl7u.fsf@gitster.g","subject":"Re: [PATCH] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-02-02T19:44:16Z","receivedAt":"2022-02-02T19:45:39Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Feb 01 2022, Junio C Hamano wrote:\n\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>> Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a\n>> windows named pipe, 2018-09-11) use the same \"skip_all\" pattern as an\n>> existing Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB\n>> by default, 2018-10-30) uses.\n>>\n>> This way TAP consumers like \"prove\" will show a nice summary when the\n>> test is skipped, e.g.:\n>\n> ... as opposed to?  A failure?  A different appearance of the log\n> message?  Something else?\n\nIn \"prove\" we go from simply showing \"ok\":\n    \n    $ prove t0051-windows-named-pipe.sh\n    t0051-windows-named-pipe.sh .. ok   \n    All tests successful.\n    Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.03 cusr  0.01 csys =  0.06 CPU)\n    Result: PASS\n    \nTo showing the skip message quoted here:\n\n>>\n>>     $ prove t0051-windows-named-pipe.sh\n>>     [...]\n>>     t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n>>     [...]\n\nBut YMMV. We're now making use of the right TAP-y way to communicate\nthis to the consumer. I.e. skipping the whole test file, v.s. skipping\nindividual tests (in this case there's only one test).\n\n>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>> ---\n>>\n>> A trivial UX improvement for the \"prove\" output, so that we'll show a\n>> notice in the same way as e.g. t0029-core-unsetenvvars.sh and\n>> t5580-unc-paths.sh do (which are both Windows-specific).\n>>\n>>  t/t0051-windows-named-pipe.sh | 7 ++++++-\n>>  1 file changed, 6 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh\n>> index 10ac92d2250..412f413360d 100755\n>> --- a/t/t0051-windows-named-pipe.sh\n>> +++ b/t/t0051-windows-named-pipe.sh\n>> @@ -3,8 +3,13 @@\n>>  test_description='Windows named pipes'\n>>  \n>>  . ./test-lib.sh\n>> +if ! test_have_prereq MINGW\n>> +then\n>> +\tskip_all='skipping Windows-specific tests'\n>> +\ttest_done\n>> +fi\n>>  \n>> -test_expect_success MINGW 'o_append write to named pipe' '\n>> +test_expect_success 'o_append write to named pipe' '\n>>  \tGIT_TRACE=\"$(pwd)/expect\" git status >/dev/null 2>&1 &&\n>>  \t{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&\n>>  \tpid=$! &&\n\n"},{"id":"447555","messageId":"xmqq7dad10oy.fsf@gitster.g","threadId":"57352","inReplyTo":"220202.86zgn96oip.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-02-02T20:19:09Z","receivedAt":"2022-02-02T20:19:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>>> This way TAP consumers like \"prove\" will show a nice summary when the\n>>> test is skipped, e.g.:\n>>\n>> ... as opposed to?  A failure?  A different appearance of the log\n>> message?  Something else?\n>\n> In \"prove\" we go from simply showing \"ok\":\n>     \n>     $ prove t0051-windows-named-pipe.sh\n>     t0051-windows-named-pipe.sh .. ok   \n>     All tests successful.\n>     Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.03 cusr  0.01 csys =  0.06 CPU)\n>     Result: PASS\n>     \n> To showing the skip message quoted here:\n\nBecause you have been here long enough, I trust that you already\nknow this, but for the benefit of those reading from sidelines...\n\nAs with many questions I give during my code review, this was not a\nrequest:\"I do not understand this---please explain it to me\".  It\npoined out the part in the proposed log message that future readers\nof \"git log\" would be puzzled about and needs to be improved.\n\nThanks for a reply.\n\n\n\n"},{"id":"447726","messageId":"patch-v2-1.1-1bc93bcba4b-20220204T134208Z-avarab@gmail.com","threadId":"57352","inReplyTo":"patch-1.1-34ff968dcb8-20220201T203428Z-avarab@gmail.com","subject":"[PATCH v2] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-02-04T13:42:14Z","receivedAt":"2022-02-04T13:42:39Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a\nwindows named pipe, 2018-09-11) use the same \"skip_all\" pattern as an\nexisting Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB\nby default, 2018-10-30) uses.\n\nThis way TAP consumers like \"prove\" will show a nice summary when the\ntest is skipped. Instead of:\n\n    $ prove t0051-windows-named-pipe.sh\n    [...]\n    t0051-windows-named-pipe.sh .. ok\n    [...]\n\nWe will prominently show a \"skipped\" notice:\n\n    $ prove t0051-windows-named-pipe.sh\n    [...]\n    t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n    [...]\n\nThis is because we are now making use of the right TAP-y way to\ncommunicate this to the consumer. I.e. skipping the whole test file,\nv.s. skipping individual tests (in this case there's only one test).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\nRange-diff against v1:\n1:  34ff968dcb8 ! 1:  1bc93bcba4b t0051: use \"skip_all\" under !MINGW in single-test file\n    @@ Commit message\n         by default, 2018-10-30) uses.\n     \n         This way TAP consumers like \"prove\" will show a nice summary when the\n    -    test is skipped, e.g.:\n    +    test is skipped. Instead of:\n    +\n    +        $ prove t0051-windows-named-pipe.sh\n    +        [...]\n    +        t0051-windows-named-pipe.sh .. ok\n    +        [...]\n    +\n    +    We will prominently show a \"skipped\" notice:\n     \n             $ prove t0051-windows-named-pipe.sh\n             [...]\n             t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n             [...]\n     \n    +    This is because we are now making use of the right TAP-y way to\n    +    communicate this to the consumer. I.e. skipping the whole test file,\n    +    v.s. skipping individual tests (in this case there's only one test).\n    +\n         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n     \n      ## t/t0051-windows-named-pipe.sh ##\n\n t/t0051-windows-named-pipe.sh | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh\nindex 10ac92d2250..412f413360d 100755\n--- a/t/t0051-windows-named-pipe.sh\n+++ b/t/t0051-windows-named-pipe.sh\n@@ -3,8 +3,13 @@\n test_description='Windows named pipes'\n \n . ./test-lib.sh\n+if ! test_have_prereq MINGW\n+then\n+\tskip_all='skipping Windows-specific tests'\n+\ttest_done\n+fi\n \n-test_expect_success MINGW 'o_append write to named pipe' '\n+test_expect_success 'o_append write to named pipe' '\n \tGIT_TRACE=\"$(pwd)/expect\" git status >/dev/null 2>&1 &&\n \t{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&\n \tpid=$! &&\n-- \n2.35.1.940.ge7a5b4b05f2\n\n"},{"id":"447989","messageId":"nycvar.QRO.7.76.6.2202081437450.347@tvgsbejvaqbjf.bet","threadId":"57352","inReplyTo":"patch-v2-1.1-1bc93bcba4b-20220204T134208Z-avarab@gmail.com","subject":"Re: [PATCH v2] t0051: use \"skip_all\" under !MINGW in single-test file","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2022-02-08T13:40:58Z","receivedAt":"2022-02-08T13:41:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Fri, 4 Feb 2022, Ævar Arnfjörð Bjarmason wrote:\n\n> Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a\n> windows named pipe, 2018-09-11) use the same \"skip_all\" pattern as an\n> existing Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB\n> by default, 2018-10-30) uses.\n\nThis is not a nit, even if I won't insist on changing it in this instance:\nThis sentence is unnecessarily convoluted and therefore harder to read\nthan it has to be. Please pay attention to readability next time you craft\na commit message.\n\nThe rest of the commit message as well as the diff look good to me.\n\nThanks,\nJohannes\n\n>\n> This way TAP consumers like \"prove\" will show a nice summary when the\n> test is skipped. Instead of:\n>\n>     $ prove t0051-windows-named-pipe.sh\n>     [...]\n>     t0051-windows-named-pipe.sh .. ok\n>     [...]\n>\n> We will prominently show a \"skipped\" notice:\n>\n>     $ prove t0051-windows-named-pipe.sh\n>     [...]\n>     t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n>     [...]\n>\n> This is because we are now making use of the right TAP-y way to\n> communicate this to the consumer. I.e. skipping the whole test file,\n> v.s. skipping individual tests (in this case there's only one test).\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n> Range-diff against v1:\n> 1:  34ff968dcb8 ! 1:  1bc93bcba4b t0051: use \"skip_all\" under !MINGW in single-test file\n>     @@ Commit message\n>          by default, 2018-10-30) uses.\n>\n>          This way TAP consumers like \"prove\" will show a nice summary when the\n>     -    test is skipped, e.g.:\n>     +    test is skipped. Instead of:\n>     +\n>     +        $ prove t0051-windows-named-pipe.sh\n>     +        [...]\n>     +        t0051-windows-named-pipe.sh .. ok\n>     +        [...]\n>     +\n>     +    We will prominently show a \"skipped\" notice:\n>\n>              $ prove t0051-windows-named-pipe.sh\n>              [...]\n>              t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests\n>              [...]\n>\n>     +    This is because we are now making use of the right TAP-y way to\n>     +    communicate this to the consumer. I.e. skipping the whole test file,\n>     +    v.s. skipping individual tests (in this case there's only one test).\n>     +\n>          Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>\n>       ## t/t0051-windows-named-pipe.sh ##\n>\n>  t/t0051-windows-named-pipe.sh | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh\n> index 10ac92d2250..412f413360d 100755\n> --- a/t/t0051-windows-named-pipe.sh\n> +++ b/t/t0051-windows-named-pipe.sh\n> @@ -3,8 +3,13 @@\n>  test_description='Windows named pipes'\n>\n>  . ./test-lib.sh\n> +if ! test_have_prereq MINGW\n> +then\n> +\tskip_all='skipping Windows-specific tests'\n> +\ttest_done\n> +fi\n>\n> -test_expect_success MINGW 'o_append write to named pipe' '\n> +test_expect_success 'o_append write to named pipe' '\n>  \tGIT_TRACE=\"$(pwd)/expect\" git status >/dev/null 2>&1 &&\n>  \t{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&\n>  \tpid=$! &&\n> --\n> 2.35.1.940.ge7a5b4b05f2\n>\n>\n"}]}