From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, <git@vger.kernel.org>
Subject: Re: t4111 fails under valgrind
Date: Wed, 4 Aug 2010 12:06:11 +0200 [thread overview]
Message-ID: <201008041206.11367.trast@student.ethz.ch> (raw)
In-Reply-To: <20100730183122.GA7578@dert.cs.uchicago.edu>
Jonathan Nieder wrote:
> -- 8< --
> Subject: t4111 (apply): refresh index before applying patches to it
>
> "git apply", like most plumbing, does not automatically refresh the
> index file even if it is only stat-dirty. So unless the two "cp"
> commands in reset_preimage() for a given file happen to have the same
> time stamp, there will be a spurious
>
> error: sub/dir/file: does not match index
>
> Refresh the index to eliminate this timing dependency. Noticed by
> running the test with --valgrind (which slows things down a lot).
>
> Reported-by: Thomas Rast <trast@student.ethz.ch>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> diff --git a/t/t4111-apply-subdir.sh b/t/t4111-apply-subdir.sh
> index 57cae50..a52d94a 100755
> --- a/t/t4111-apply-subdir.sh
> +++ b/t/t4111-apply-subdir.sh
> @@ -36,7 +36,8 @@ test_expect_success 'setup: subdir' '
> cp "$2" file &&
> cp "$2" sub/dir/file &&
> cp "$2" sub/dir/b/file &&
> - cp "$2" objects/file
> + cp "$2" objects/file &&
> + test_might_fail git update-index --refresh -q
> }
> '
Junio, can you pick this up? t4111 consistently fails for me without
it.
--
Thomas Rast
trast@{inf,student}.ethz.ch
prev parent reply other threads:[~2010-08-04 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 10:18 t4111 fails under valgrind Thomas Rast
2010-07-30 18:31 ` Jonathan Nieder
2010-07-30 18:39 ` Thomas Rast
2010-08-04 10:06 ` Thomas Rast [this message]
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=201008041206.11367.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/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).