From: Jeff King <peff@peff.net>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: t0027 racy?
Date: Tue, 9 Aug 2016 02:51:10 -0400 [thread overview]
Message-ID: <20160809065110.GB17777@peff.net> (raw)
In-Reply-To: <20160808203224.GA28431@tb-raspi>
On Mon, Aug 08, 2016 at 08:32:24PM +0000, Torsten Bögershausen wrote:
> > The verbose output is not very exciting, though:
> >
> > expecting success:
> > check_warning "$lfwarn" ${pfx}_LF.err
> >
> > --- NNO_attr_auto_aeol_crlf_false_LF.err.expect 2016-08-08 15:26:37.061701392 +0000
> > +++ NNO_attr_auto_aeol_crlf_false_LF.err.actual 2016-08-08 15:26:37.061701392 +0000
> > @@ -1 +0,0 @@
> > -warning: LF will be replaced by CRLF
> > not ok 114 - commit NNO files crlf=false attr=auto LF
> [...]
> The warning is missing, but should be there:
>
> The file has LF, and after commit and a new checkout these LF will
> be convertet into CRLF.
>
> So why isn't the warning there (but here on my oldish machines)
To be clear, the warning _is_ there when I just run t0027 by itself, and
the test passes. It's only under heavy load that it isn't. So it's a
race condition either in the test script or in git itself.
Usually race conditions like these are due to one of:
- git dying from SIGPIPE before it has a chance to output the command.
But I don't see any pipes being used in the test script.
- index raciness causing us to avoid reading file content. For
example, if you do:
echo foo >bar
git add bar
Then _usually_ "bar" and the index will have the same mtime. And
therefore subsequent commands that need to refresh the index will
re-read the content of "bar", because they cannot tell from the stat
information if we have the latest version of "bar" in the index or
not (it could have been written after the index update, but in the
same second).
But on a slow or heavily loaded system (or if you simply get unlucky
in crossing the boundary to a new second), they'll have different
mtimes. And therefore git knows it can skip reading the content from
the filesystem.
So if your test relies on git actually re-converting the file
content, it would sometimes randomly fail.
The second one seems plausible, given the history of issues with
changing CRLF settings for an existing checkout. I'm not sure if it
would be feasible to reset the index completely before each tested
command, but that would probably solve it.
-Peff
next prev parent reply other threads:[~2016-08-09 6:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 15:05 t0027 racy? Johannes Schindelin
2016-08-08 15:29 ` Jeff King
2016-08-08 20:32 ` Torsten Bögershausen
2016-08-09 6:51 ` Jeff King [this message]
2016-08-09 7:03 ` Jeff King
2016-08-09 11:27 ` Johannes Schindelin
2016-08-09 11:33 ` Torsten Bögershausen
2016-08-09 11:49 ` Jeff King
2016-08-09 12:59 ` Torsten Bögershausen
2016-08-09 13:27 ` Jeff King
2016-08-09 21:28 ` Torsten Bögershausen
2016-08-10 12:28 ` Johannes Schindelin
2016-08-11 18:58 ` Torsten Bögershausen
2016-08-11 19:34 ` Junio C Hamano
2016-08-12 7:24 ` Jeff King
2016-08-12 16:50 ` [PATCH v1 0/2] Fix conversion warnings tboegi
2016-08-12 16:51 ` [PATCH v1 1/2] t0027: Correct raciness in NNO test tboegi
2016-08-12 17:56 ` Junio C Hamano
2016-08-13 16:50 ` Johannes Sixt
2016-08-13 21:18 ` Torsten Bögershausen
2016-08-14 20:37 ` Junio C Hamano
2016-08-12 16:51 ` [PATCH v1 2/2] convert: missing `LF will be replaced by CRLF tboegi
2016-08-12 17:52 ` Junio C Hamano
2016-08-13 21:29 ` [PATCH v2 0/1] convert: Correct NNO tests and missing `LF will be replaced by CRLF` tboegi
2016-08-17 12:46 ` Johannes Schindelin
2016-08-13 21:29 ` [PATCH v2 1/1] " tboegi
2016-08-19 9:41 ` [PATCH v1 0/1] Rename NotNormalized (NNO) into CRLF in index tboegi
2016-08-19 16:39 ` Junio C Hamano
2016-08-19 9:41 ` [PATCH v1 1/1] t0027: " tboegi
2016-08-25 15:52 ` [PATCH v1 0/3] Update eol documentation tboegi
2016-08-25 20:31 ` Junio C Hamano
2016-08-26 1:00 ` Jacob Keller
2016-08-26 7:03 ` Torsten Bögershausen
2016-08-25 15:52 ` [PATCH v1 1/2] git ls-files: text=auto eol=lf is supported in Git 2.10 tboegi
2016-08-25 20:38 ` Junio C Hamano
2016-08-25 15:52 ` [PATCH v1 2/2] gitattributes: Document the unified "auto" handling tboegi
2016-08-25 20:46 ` Junio C Hamano
2016-08-26 20:18 ` [PATCH v2 0/2] Adjust the documentation to " tboegi
2016-08-26 20:18 ` [PATCH v2 1/2] git ls-files: text=auto eol=lf is supported in Git 2.10 tboegi
2016-08-26 20:18 ` [PATCH v2 2/2] gitattributes: Document the unified "auto" handling tboegi
2016-08-26 20:53 ` Junio C Hamano
2016-08-09 11:33 ` t0027 racy? Johannes Schindelin
2016-08-09 11:38 ` Jeff King
2016-08-08 18:24 ` Torsten Bögershausen
2016-08-09 11:25 ` Johannes Schindelin
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=20160809065110.GB17777@peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=tboegi@web.de \
/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).