t9106 failure, bisect weirdness
Hi all,
Just checked out v1.5.3.6 from git, built it on a Debian/stable i386 box, and got a failure in one of the test suites:
*** t9106-git-svn-dcommit-clobber-series.sh ***
* ok 1: initialize repo * ok 2: (supposedly) non-conflicting change from SVN * ok 3: some unrelated changes to git
* FAIL 4: change file but in unrelated area
test x"`sed -n -e 4p < file`" = x4 &&
test x"`sed -n -e 7p < file`" = x7 &&
perl -i -p -e 's/^4$/4444/' file &&
perl -i -p -e 's/^7$/7777/' file &&
test x"`sed -n -e 4p < file`" = x4444 &&
test x"`sed -n -e 7p < file`" = x7777 &&
git commit -m '4 => 4444, 7 => 7777' file &&
git svn dcommit &&
svn up tmp &&
cd tmp &&
test x"`sed -n -e 4p < file`" = x4444 &&
test x"`sed -n -e 7p < file`" = x7777 &&
test x"`sed -n -e 58p < file`" = x5588 &&
test x"`sed -n -e 61p < file`" = x6611* ok 5: attempt to dcommit with a dirty index
* failed 1 among 5 test(s)
make[1]: *** [t9106-git-svn-dcommit-clobber-series.sh] Error 1 make[1]: Leaving directory `/home/ramune/src/git/git/t'
make: *** [test] Error 2
ramune/lycaeum:git:
Bisecting gives me:
fb159580a1628947f0a088e24cfe6fe4c81d99d0 is first bad commit commit fb159580a1628947f0a088e24cfe6fe4c81d99d0
Author: Eric Wong <[email protected]> Date: Mon Nov 5 03:21:48 2007 -0800
git-svn: t9114: verify merge commit message in test
It's possible that we end up with an incorrect commit message in this test after making changes to fix the clobber bug in dcommit.
:040000 040000 1c4f3776c031f9531869e736b661a0559fab5ff6 4f4c5ecd6c79f7e9732b554e2f8dd536a8a8f2a6 M t
Which seems odd -- the previous commit (marked good, because make test didn't fail) was the one that modified t9106-git-svn-dcommit-clobber-series.sh.
I tried running the test manually and noticed something weird as well:
ramune/lycaeum:t: sh t9106-git-svn-dcommit-clobber-series.sh
* ok 1: initialize repo * ok 2: (supposedly) non-conflicting change from SVN * ok 3: some unrelated changes to git * ok 4: change file but in unrelated area
* passed all 4 test(s)
ramune/lycaeum:t:
ramune/lycaeum:t: pwd/home/ramune/src/git/git/t
ramune/lycaeum:t:
ramune/lycaeum:t: sh t9106-git-svn-dcommit-clobber-series.sh
* ok 1: initialize repo * ok 2: (supposedly) non-conflicting change from SVN * ok 3: some unrelated changes to git
* FAIL 4: change file but in unrelated area
test x"`sed -n -e 4p < file`" = x4 &&
test x"`sed -n -e 7p < file`" = x7 &&
perl -i -p -e 's/^4$/4444/' file &&
perl -i -p -e 's/^7$/7777/' file &&
test x"`sed -n -e 4p < file`" = x4444 &&
test x"`sed -n -e 7p < file`" = x7777 &&
git commit -m '4 => 4444, 7 => 7777' file &&
git svn dcommit &&
svn up tmp &&
cd tmp &&
test x"`sed -n -e 4p < file`" = x4444 &&
test x"`sed -n -e 7p < file`" = x7777 &&
test x"`sed -n -e 58p < file`" = x5588 &&
test x"`sed -n -e 61p < file`" = x6611* failed 1 among 4 test(s)
So it succeeds once, then fails.
/bin/sh is dash 0.5.3-7 from Debian.
Any additional information needed?
-- DN
Daniel
Le mardi 20 novembre 2007, carbonated beverage a écrit :
[...]
Quoted 33 lines
I tried running the test manually and noticed something weird as well:
ramune/lycaeum:t: sh
t9106-git-svn-dcommit-clobber-series.sh* ok 1: initialize repo * ok 2: (supposedly) non-conflicting change from SVN * ok 3: some unrelated changes to git * ok 4: change file but in unrelated area* passed all 4 test(s)
ramune/lycaeum:t:
ramune/lycaeum:t: pwd/home/ramune/src/git/git/t
ramune/lycaeum:t:
ramune/lycaeum:t: sht9106-git-svn-dcommit-clobber-series.sh* ok 1: initialize repo * ok 2: (supposedly) non-conflicting change from SVN * ok 3: some unrelated changes to git* FAIL 4: change file but in unrelated area
test x"`sed -n -e 4p < file`" = x4 && test x"`sed -n -e 7p < file`" = x7 && perl -i -p -e 's/^4$/4444/' file && perl -i -p -e 's/^7$/7777/' file && test x"`sed -n -e 4p < file`" = x4444 && test x"`sed -n -e 7p < file`" = x7777 && git commit -m '4 => 4444, 7 => 7777' file && git svn dcommit && svn up tmp && cd tmp && test x"`sed -n -e 4p < file`" = x4444 && test x"`sed -n -e 7p < file`" = x7777 && test x"`sed -n -e 58p < file`" = x5588 && test x"`sed -n -e 61p < file`" = x6611
Quoted 7 lines
* failed 1 among 4 test(s)
So it succeeds once, then fails.
/bin/shis dash 0.5.3-7 from Debian.Any additional information needed?
Could you try running the test twice when you bisect ? This way bisecting should give you the real first bad commit.
Could you also try to find the line that fails in the 4th test ? For example you could replace all the trailing "&&" in this test with a new line that contains "echo $?".
Thanks in advance,
Christian.
Quoted 2 lines
Could you try running the test twice when you bisect ? This way bisecting should give you the real first bad commit.
I re-ran it several times, and also manually -- there were times it'd succeed 6 times in a row before failing. Weird.
Finally, the bisect came down to:
ramune/lycaeum:git: git bisect good c74d9acf20ba0c69bbd67c5b0bb3bd3c2349cebe is first bad commit commit c74d9acf20ba0c69bbd67c5b0bb3bd3c2349cebe
Author: Eric Wong <[email protected]>
Date: Mon Nov 5 03:21:47 2007 -0800
git-svn: fix dcommit clobbering when committing a series of diffs
Modifying the failing t9106-git-svn-dcommit-clobber-series.sh test to add touch statements as so:
test x\"\`sed -n -e 4p < file\`\" = x4444 && touch '/tmp/eleven' && test x\"\`sed -n -e 7p < file\`\" = x7777 && touch '/tmp/twelve' && test x\"\`sed -n -e 58p < file\`\" = x5588 && touch '/tmp/thirteen' && test x\"\`sed -n -e 61p < file\`\" = x6611
Line 52 was the culprit:
test x\"\sed -n -e 58p < file\\" = x5588 &&
-- DN
Daniel
Quoted 8 lines · carbonated beverage
Quoted 2 lines
Could you try running the test twice when you bisect ? This way bisecting should give you the real first bad commit.
I re-ran it several times, and also manually -- there were times it'd succeed 6 times in a row before failing. Weird.
Finally, the bisect came down to:
Quoted 7 lines
ramune/lycaeum:git: git bisect good
c74d9acf20ba0c69bbd67c5b0bb3bd3c2349cebeis first bad commit commitc74d9acf20ba0c69bbd67c5b0bb3bd3c2349cebe
Author: Eric Wong <[email protected]>
Date: Mon Nov 5 03:21:47 2007 -0800git-svn: fix dcommit clobbering when committing a series of diffs
Thanks for having done that. Unfortunately I don't know this part of the code, so I cc'ed Eric.
Quoted 11 lines
Modifying the failing
t9106-git-svn-dcommit-clobber-series.shtest to add touch statements as so:test x\"\`sed -n -e 4p < file\`\" = x4444 && touch '/tmp/eleven' && test x\"\`sed -n -e 7p < file\`\" = x7777 && touch '/tmp/twelve' && test x\"\`sed -n -e 58p < file\`\" = x5588 && touch '/tmp/thirteen' && test x\"\`sed -n -e 61p < file\`\" = x6611Line 52 was the culprit:
test x\"\
sed -n -e 58p < file\\" = x5588 &&
Ok thanks for doing that too.
Could you also look at the "file" when the test succeed and when it does not and send us both versions and a diff between them (if it's not too big).
Thanks in advance,
Christian.
Quoted 3 lines
Ok thanks for doing that too.
Could you also look at the "file" when the test succeed and when it does not and send us both versions and a diff between them (if it's not too big).
Size-wise, they're tiny -- though there's a lot of lines.
The diff:
ramune/lycaeum:t: diff -u works.t fails.t
fails.t 2007-11-20 21:54:39.000000000 -0700 renamed from works.t 2007-11-20 21:54:29.000000000 -0700 +2 -2
@@ -55,9 +55,9 @@ 55 56 57 -5588 +58 59 60 -6611 +61 62 63
And the full (working) file:
1
2
3
4444
5
6
7777
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
5588
59
60
6611
62
63
Hi, thanks for the heads up, Christian
Quoted 13 lines · carbonated beverage
Quoted 3 lines
Ok thanks for doing that too.
Could you also look at the "file" when the test succeed and when it does not and send us both versions and a diff between them (if it's not too big).Size-wise, they're tiny -- though there's a lot of lines.
The diff:
ramune/lycaeum:t: diff -u works.t fails.t
fails.t 2007-11-20 21:54:39.000000000 -0700 renamed from works.t 2007-11-20 21:54:29.000000000 -0700 +0
-0@@ -55,9 +55,9 @@ 55
fails.t 2007-11-20 21:54:39.000000000 -0700 line 63
Quoted 10 lines
fails.t 2007-11-20 21:54:39.000000000 -0700 renamed from works.t 2007-11-20 21:54:29.000000000 -0700 +2
-256 57 -5588 +58 59 60 -6611 +61 62 63
Ah, these changes should've been made on the svn side. But I'm betting a race condition appears on faster computers (which we've seen before in other tests).
I can't reproduce it at all on any of my boxes, but does the following one-liner fix it consistently?
Thanks,
From: Eric Wong <[email protected]>
Date: Wed, 21 Nov 2007 00:57:33 -0800
Subject: [PATCH] t9106: fix a race condition that caused svn to miss modifications
carbonated beverage noticed this test was occasionally failing.
--- t/t9106-git-svn-dcommit-clobber-series.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
t/t9106-git-svn-dcommit-clobber-series.sh +1 -0
@@ -22,6 +22,7 @@ test_expect_success '(supposedly) non-conflicting change from SVN' " cd tmp && perl -i -p -e 's/^58\$/5588/' file && perl -i -p -e 's/^61\$/6611/' file && + poke file && test x\"\`sed -n -e 58p < file\`\" = x5588 && test x\"\`sed -n -e 61p < file\`\" = x6611 && svn commit -m '58 => 5588, 61 => 6611' &&
Signature · 1 line
Eric Wong
Quoted 2 lines
I can't reproduce it at all on any of my boxes, but does the following one-liner fix it consistently?
FYI, it's a Core 2 Duo @ 2GHz (Thinkpad Z61t).
Yup, I ran the test in a loop, and it went through 15 iterations without failure. This patch works for me.
Thanks!
-- DN
Daniel