(warning) Tonight's 'pu' may fail its tests
I usually try to make sure all four integration branches (maint, master, next and pu) pass the selftest before pushing the results out, but it seems that there is a subtle breakage somewhere in 'pu' that breaks t4203-mailmap.sh. The breakage is not reliably reproducible but happens very often when tests are run in parallel (e.g. "make -j4").
I originally was planning to merge ms/mailmap to 'next' before tonight's pushout, but I ran out of time and had to yank the topic out of 'next' and kicked it back to 'pu'.
Does the following log ring a bell to anybody?
----------------------------------------------------------------
Initialized empty Git repository in /git/git.git/t/trash directory.t4203-mailmap/.git/
* expecting success:
echo one >one &&
git add one &&
test_tick &&
git commit -m initial &&
echo two >>one &&
git add one &&
git commit --author "nick1 <[email protected]>" -m second[master (root-commit) 3a2fdcb] initial
1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 one [master 7de6f99] second 1 files changed, 1 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
git shortlog >actual &&
test_cmp expect actual
actual 2009-02-06 10:47:25.000000000 +0000 renamed from expect 2009-02-06 10:47:25.000000000 +0000 +0 -6
@@ -1,6 +0,0 @@ -A U Thor (1): - initial - -nick1 (1): - second -
* FAIL 2: No mailmap
git shortlog >actual &&
test_cmp expect actual
make[2]: *** [t4203-mailmap.sh] Error 1
----------------------------------------------------------------
The frustrating thing is that
GIT_SKIP_TESTS='t[0-35-9]??? t4[01]??' \
GIT_TEST_OPTS='-i -v' \
make -j4 testfails very reliably with the above log, but:
(1) running the same "../../git-shortlog" in "t/trash directory.t4203-mailmap/"
immediately after the test failed does emit the expected result;
(2) going down to t/ and manually running t4203-mailmap.sh alone succeeds;
(3) running the tests serially (i.e. without -j4) allows the test to succeed.
Quoted 6 lines · Junio C Hamano
The frustrating thing is that
GIT_SKIP_TESTS='t[0-35-9]??? t4[01]??' \ GIT_TEST_OPTS='-i -v' \ make -j4 test
Quoted 8 lines
fails very reliably with the above log, but:
(1) running the same "../../git-shortlog" in "t/trash directory.t4203-mailmap/"
immediately after the test failed does emit the expected result;(2) going down to t/ and manually running
t4203-mailmap.shalone succeeds;(3) running the tests serially (i.e. without -j4) allows the test to succeed.
The test is broken and here is a fix I'll be squashing into the series.
The mystery was simply that it failed when the test was run in the background (i.e. !isatty(0)) because it used "git shortlog" without saying that it wants a shortlog from HEAD down to root explicitly.
t/t4203-mailmap.sh | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
t/t4203-mailmap.sh +7 -7
@@ -24,7 +24,7 @@ nick1 (1): EOF test_expect_success 'No mailmap' ' - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -39,7 +39,7 @@ EOF test_expect_success 'default .mailmap' ' echo "Repo Guy <[email protected]>" > .mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -57,7 +57,7 @@ test_expect_success 'log.mailmap set' ' mkdir internal_mailmap && echo "Internal Guy <[email protected]>" > internal_mailmap/.mailmap && git config log.mailmap internal_mailmap/.mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -72,7 +72,7 @@ EOF test_expect_success 'log.mailmap override' ' echo "External Guy <[email protected]>" >> internal_mailmap/.mailmap && git config log.mailmap internal_mailmap/.mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -88,7 +88,7 @@ EOF test_expect_success 'log.mailmap file non-existant' ' rm internal_mailmap/.mailmap && rmdir internal_mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -102,7 +102,7 @@ nick1 (1): EOF test_expect_success 'No mailmap files, but configured' ' rm .mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '
@@ -162,7 +162,7 @@ test_expect_success 'Shortlog output (complex mapping)' ' echo "Santa Claus <[email protected]> <[email protected]>" >> internal_mailmap/.mailmap && echo "Santa Claus <[email protected]> <[email protected]>" >> internal_mailmap/.mailmap && - git shortlog -e >actual && + git shortlog -e HEAD >actual && test_cmp expect actual '