{"thread":{"id":"17605","subject":"(warning) Tonight's 'pu' may fail its tests","startedAt":"2009-02-06T11:02:43Z","lastAt":"2009-02-06T11:32:11Z","messageCount":2,"participants":["Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103450","messageId":"7v7i437rqk.fsf@gitster.siamese.dyndns.org","threadId":"17605","inReplyTo":null,"subject":"(warning) Tonight's 'pu' may fail its tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-06T11:02:43Z","receivedAt":"2009-02-06T11:02:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I usually try to make sure all four integration branches (maint, master,\nnext and pu) pass the selftest before pushing the results out, but it\nseems that there is a subtle breakage somewhere in 'pu' that breaks\nt4203-mailmap.sh.  The breakage is not reliably reproducible but happens\nvery often when tests are run in parallel (e.g. \"make -j4\").\n\nI originally was planning to merge ms/mailmap to 'next' before tonight's\npushout, but I ran out of time and had to yank the topic out of 'next' and\nkicked it back to 'pu'.\n\nDoes the following log ring a bell to anybody?\n\n----------------------------------------------------------------\nInitialized empty Git repository in /git/git.git/t/trash directory.t4203-mailmap/.git/\n* expecting success:\n        echo one >one &&\n        git add one &&\n        test_tick &&\n        git commit -m initial &&\n        echo two >>one &&\n        git add one &&\n        git commit --author \"nick1 <bugs@company.xx>\" -m second\n\n[master (root-commit) 3a2fdcb] initial\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 one\n[master 7de6f99] second\n 1 files changed, 1 insertions(+), 0 deletions(-)\n*   ok 1: setup\n\n* expecting success:\n        git shortlog >actual &&\n        test_cmp expect actual\n\n--- expect      2009-02-06 10:47:25.000000000 +0000\n+++ actual      2009-02-06 10:47:25.000000000 +0000\n@@ -1,6 +0,0 @@\n-A U Thor (1):\n-      initial\n-\n-nick1 (1):\n-      second\n-\n* FAIL 2: No mailmap\n\n                git shortlog >actual &&\n                test_cmp expect actual\n\nmake[2]: *** [t4203-mailmap.sh] Error 1\n----------------------------------------------------------------\n\nThe frustrating thing is that\n\n    GIT_SKIP_TESTS='t[0-35-9]??? t4[01]??' \\\n    GIT_TEST_OPTS='-i -v' \\\n    make -j4 test\n\nfails very reliably with the above log, but:\n\n (1) running the same \"../../git-shortlog\" in  \"t/trash directory.t4203-mailmap/\"\n     immediately after the test failed does emit the expected result;\n\n (2) going down to t/ and manually running t4203-mailmap.sh alone succeeds;\n\n (3) running the tests serially (i.e. without -j4) allows the test to succeed.\n"},{"id":"103459","messageId":"7v3aer7qdg.fsf@gitster.siamese.dyndns.org","threadId":"17605","inReplyTo":"7v7i437rqk.fsf@gitster.siamese.dyndns.org","subject":"Re: (warning) Tonight's 'pu' may fail its tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-06T11:32:11Z","receivedAt":"2009-02-06T11:32:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> The frustrating thing is that\n>\n>     GIT_SKIP_TESTS='t[0-35-9]??? t4[01]??' \\\n>     GIT_TEST_OPTS='-i -v' \\\n>     make -j4 test\n>\n> fails very reliably with the above log, but:\n>\n>  (1) running the same \"../../git-shortlog\" in  \"t/trash directory.t4203-mailmap/\"\n>      immediately after the test failed does emit the expected result;\n>\n>  (2) going down to t/ and manually running t4203-mailmap.sh alone succeeds;\n>\n>  (3) running the tests serially (i.e. without -j4) allows the test to succeed.\n\nThe test is broken and here is a fix I'll be squashing into the series.\n\nThe mystery was simply that it failed when the test was run in the\nbackground (i.e. !isatty(0)) because it used \"git shortlog\" without saying\nthat it wants a shortlog from HEAD down to root explicitly.\n\n t/t4203-mailmap.sh |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git i/t/t4203-mailmap.sh w/t/t4203-mailmap.sh\nindex c7a1238..094d905 100755\n--- i/t/t4203-mailmap.sh\n+++ w/t/t4203-mailmap.sh\n@@ -24,7 +24,7 @@ nick1 (1):\n EOF\n \n test_expect_success 'No mailmap' '\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -39,7 +39,7 @@ EOF\n \n test_expect_success 'default .mailmap' '\n \techo \"Repo Guy <author@example.com>\" > .mailmap &&\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'log.mailmap set' '\n \tmkdir internal_mailmap &&\n \techo \"Internal Guy <bugs@company.xx>\" > internal_mailmap/.mailmap &&\n \tgit config log.mailmap internal_mailmap/.mailmap &&\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -72,7 +72,7 @@ EOF\n test_expect_success 'log.mailmap override' '\n \techo \"External Guy <author@example.com>\" >> internal_mailmap/.mailmap &&\n \tgit config log.mailmap internal_mailmap/.mailmap &&\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -88,7 +88,7 @@ EOF\n test_expect_success 'log.mailmap file non-existant' '\n \trm internal_mailmap/.mailmap &&\n \trmdir internal_mailmap &&\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -102,7 +102,7 @@ nick1 (1):\n EOF\n test_expect_success 'No mailmap files, but configured' '\n \trm .mailmap &&\n-\tgit shortlog >actual &&\n+\tgit shortlog HEAD >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -162,7 +162,7 @@ test_expect_success 'Shortlog output (complex mapping)' '\n \techo \"Santa Claus <santa.claus@northpole.xx> <me@company.xx>\" >> internal_mailmap/.mailmap &&\n \techo \"Santa Claus <santa.claus@northpole.xx> <me@company.xx>\" >> internal_mailmap/.mailmap &&\n \n-\tgit shortlog -e >actual &&\n+\tgit shortlog -e HEAD >actual &&\n \ttest_cmp expect actual\n \n '\n"}]}