git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFH] Spurious failures of t0025.[34]
@ 2010-07-29 21:40 Thomas Rast
  2010-07-30 18:25 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Rast @ 2010-07-29 21:40 UTC (permalink / raw)
  To: git; +Cc: Eyvind Bernhardsen

Hi *

I have another hard-to-explain test failure under --valgrind.  I hope
it's not yet another bug buried deep in valgrind itself...

Doing the following on current next (v1.7.2.1-230-g75e8ac1) stops
after a number of iterations, usually within 5 minutes:

  while GIT_SKIP_TESTS="t0025.[5-9] t0025.??" \
      ./t0025-crlf-auto.sh --valgrind --root=/dev/shm --tee -i
  do
    :
  done

I can reproduce this both on the machine I use for valgrinding, and my
work laptop, and they're quite different:

  openSuSE 11.3, 2.6.34, gcc 4.5.0, glibc 2.11.2
  RHEL 5.4, 2.6.18, gcc 4.1.2, glibc 2.5

I ordinarily run a bleeding edge valgrind on both (calls itself
3.6.0SVN) because of the env handling bug from last month, but I also
tried with valgrind 3.5.0 on the RHEL box, same problem.

It seems random whether it stops at test 3 or 4, but #4 seems more
frequent.  These tests read

  test_expect_success 'crlf=true causes a CRLF file to be normalized' '

          # Backwards compatibility check
          rm -f .gitattributes tmp one two three &&
          echo "two crlf" > .gitattributes &&
          git read-tree --reset -u HEAD &&

          # Note, "normalized" means that git will normalize it if added
          has_cr two &&
          twodiff=`git diff two` &&
          test -n "$twodiff"
  '

  test_expect_success 'text=true causes a CRLF file to be normalized' '

          rm -f .gitattributes tmp one two three &&
          echo "two text" > .gitattributes &&
          git read-tree --reset -u HEAD &&

          # Note, "normalized" means that git will normalize it if added
          has_cr two &&
          twodiff=`git diff two` &&
          test -n "$twodiff"
  '

I tried patching them in this way:

---- 8< ----
diff --git i/t/t0025-crlf-auto.sh w/t/t0025-crlf-auto.sh
index f5f67a6..d7424c9 100755
--- i/t/t0025-crlf-auto.sh
+++ w/t/t0025-crlf-auto.sh
@@ -48,8 +48,7 @@ test_expect_success 'crlf=true causes a CRLF file to be normalized' '
 
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
-	twodiff=`git diff two` &&
-	test -n "$twodiff"
+	test_must_fail git diff --exit-code two
 '
 
 test_expect_success 'text=true causes a CRLF file to be normalized' '
@@ -60,8 +59,7 @@ test_expect_success 'text=true causes a CRLF file to be normalized' '
 
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
-	twodiff=`git diff two` &&
-	test -n "$twodiff"
+	test_must_fail git diff --exit-code two
 '
 
 test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '
---- >8 ----

Unless I'm too tired, these should be equivalent.  I gained no extra
information by doing so; it just stops at a random iteration with an
empty diff.  Maybe it shifts the weight slightly towards #3 failing,
but that could just as well be the placebo effect, I have not done any
statistics.  It looks like

  expecting success: 

          rm -f .gitattributes tmp one two three &&
          echo "two text" > .gitattributes &&
          git read-tree --reset -u HEAD &&

          # Note, "normalized" means that git will normalize it if added
          has_cr two &&
          xxd two &&
          test_must_fail git diff --exit-code two

  0000000: 490d 0a61 6d0d 0a76 6572 790d 0a76 6572  I..am..very..ver
  0000010: 790d 0a66 696e 650d 0a74 6861 6e6b 0d0a  y..fine..thank..
  0000020: 796f 750d 0a                             you..
  not ok - 4 text=true causes a CRLF file to be normalized
  #
  #
  #               rm -f .gitattributes tmp one two three &&
  #               echo "two text" > .gitattributes &&
  #               git read-tree --reset -u HEAD &&
  #
  #               # Note, "normalized" means that git will normalize it if added
  #               has_cr two &&
  #               xxd two &&
  #               test_must_fail git diff --exit-code two
  #

I.e., nothing out of the ordinary except that the diff is empty.

So... does anyone have any ideas what to test next?  Or what might
cause this?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-05 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 21:40 [RFH] Spurious failures of t0025.[34] Thomas Rast
2010-07-30 18:25 ` Jeff King
2010-07-30 22:47   ` Thomas Rast
2010-08-05 22:01     ` Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).