Re: [RFH] Spurious failures of t0025.[34]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Rast
Date: Friday, July 30, 2010 - 3:47 pm

Jeff King wrote:

This, and Jonathan's observation about git-apply, finally got me
somewhere.  The issue is that the index file has a timestamp different
from the saved mtimes of the file itself.  This can be provoked
deterministically by the patch below, even without valgrind; valgrind
merely makes it much more likely to happen by slowing down
git-read-tree.

Now I don't know what the next step in the chain is.  Who's the
resident expert on index raciness?  Does git-diff then reindex the
file, and in doing so, change the index entry?


diff --git i/t/t0025-crlf-auto.sh w/t/t0025-crlf-auto.sh
index f5f67a6..7a9cd3a 100755
--- i/t/t0025-crlf-auto.sh
+++ w/t/t0025-crlf-auto.sh
@@ -46,6 +46,8 @@ test_expect_success 'crlf=true causes a CRLF file to be normalized' '
 	echo "two crlf" > .gitattributes &&
 	git read-tree --reset -u HEAD &&
 
+	test-chmtime +1 .git/index &&
+
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
 	twodiff=`git diff two` &&
@@ -58,6 +60,8 @@ test_expect_success 'text=true causes a CRLF file to be normalized' '
 	echo "two text" > .gitattributes &&
 	git read-tree --reset -u HEAD &&
 
+	test-chmtime +1 .git/index &&
+
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
 	twodiff=`git diff two` &&

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFH] Spurious failures of t0025.[34], Thomas Rast, (Thu Jul 29, 2:40 pm)
Re: [RFH] Spurious failures of t0025.[34], Jeff King, (Fri Jul 30, 11:25 am)
Re: [RFH] Spurious failures of t0025.[34], Thomas Rast, (Fri Jul 30, 3:47 pm)
Re: [RFH] Spurious failures of t0025.[34], Thomas Rast, (Thu Aug 5, 3:01 pm)