git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Lars Schneider <larsxschneider@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>, Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: test failure
Date: Sat, 17 Dec 2016 17:11:23 +0100	[thread overview]
Message-ID: <B3D96792-047D-4C91-8DCC-60C800B2861B@gmail.com> (raw)
In-Reply-To: <50C75781-FE3B-410F-9866-63342607707B@gmail.com>


> On 17 Dec 2016, at 15:28, Lars Schneider <larsxschneider@gmail.com> wrote:
> 
> 
>> On 16 Dec 2016, at 21:32, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:
>> 
>> Hi Lars,
>> 
>> For the last two days, I've noticed t0021.15 on the 'pu' branch has been failing intermittently (well it fails with: 'make test >ptest-out', but
>> when run by hand, it fails only say 1-in-6, 1-in-18, etc.).
>> 
>> [yes, it's a bit strange; this hasn't changed in a couple of weeks!]
>> 
>> I don't have time to investigate further tonight and, since I had not
>> heard anyone else complain, I thought I should let you know.
>> 
>> See below for the output from a failing run. [Note: this is on Linux
>> Mint 18, tonight's pu branch @7c7984401].
> 
> Thanks Ramsay! 
> 
> I was able to reproduce the problem with this test:
> 
> 	test_expect_success 'ramsay-report' '
> 		test_config_global filter.protocol.clean cat &&
> 		git init &&
> 		echo "*.r filter=protocol" >.gitattributes &&
> 		echo "bla" >test.r &&
> 		git add . &&
> 		GIT_TRACE=1 git commit -m "test commit 2" > trace 2>&1 &&
> 		grep "run_command" trace
> 	'
> 
> It looks like as if Git occasionally forgets to run the clean filter.
> I bisected the problem and I think the problem starts with "diff: do not 
> reuse worktree files that need "clean" conversion" (06dec439a3) which
> definitively sounds related.
> 
> Back in June I reported that Git invokes the clean process 4 times if a
> single file is added. Peff took a closer look and suggested the patch
> mentioned above to remove one unnecessary invocation. I re-read his comments
> and everything sounds still reasonable to me:
> http://public-inbox.org/git/1469134747-26785-1-git-send-email-larsxschneider@gmail.com/#t
> 
> Does anyone have a clue what is going on? 
> I keep digging...

Ugh. I stopped coding, started cleaning the house, and it hit me:
"git commit" shouldn't call the filter anyways. I suspect it is called in
my tests because I add and commit the file to the index right after its 
creation. All this usually happens within 1 second and therefore Git cannot
know if the file was modified between "add" and "commit". That's why it needs
to run "clean" again.

I will adjust the tests.

Cheers,
Lars

  reply	other threads:[~2016-12-17 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 20:32 test failure Ramsay Jones
2016-12-17 14:28 ` Lars Schneider
2016-12-17 16:11   ` Lars Schneider [this message]
2016-12-18 12:37     ` [PATCH v1] t0021: fix flaky test larsxschneider
2016-12-19 17:24       ` Ramsay Jones
2016-12-19 20:00         ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2014-11-08 19:28 Test failure Michael Blume
2014-11-09  1:43 ` Jeff King
2014-11-09  5:44   ` Michael Blume

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=B3D96792-047D-4C91-8DCC-60C800B2861B@gmail.com \
    --to=larsxschneider@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).