git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Subject: [RFH] Spurious failures of t0025.[34]
Date: Thu, 29 Jul 2010 23:40:01 +0200	[thread overview]
Message-ID: <201007292340.01836.trast@student.ethz.ch> (raw)

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

             reply	other threads:[~2010-07-29 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 21:40 Thomas Rast [this message]
2010-07-30 18:25 ` [RFH] Spurious failures of t0025.[34] Jeff King
2010-07-30 22:47   ` Thomas Rast
2010-08-05 22:01     ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201007292340.01836.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=eyvind.bernhardsen@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).