From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: t0027 racy?
Date: Wed, 10 Aug 2016 14:28:30 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1608101423160.4924@virtualbox> (raw)
In-Reply-To: <20160809212802.GA4132@tb-raspi>
[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]
Hi Torsten,
On Tue, 9 Aug 2016, Torsten Bögershausen wrote:
> > git -c core.autocrlf=$crlf add $fname >"${pfx}_$f.err" 2>&1
> >
> > would make more sense. We _know_ that we have to do convert_to_git() in
> > that step because the content is changed. And then you can ignore the
> > warnings from "git commit" (which are racy), or you can simply commit as
> > a whole later, as some other loops do.
> >
> > But like Dscho, I do not actually understand what this test is checking.
> > The function is called commit_chk_wrnNNO(), so perhaps you really are
> > interested in what "commit" has to say. But IMHO that is not an
> > interesting test. We know that if it has to read the content from disk,
> > it will call convert_to_git(), which is the exact same code path used by
> > "git add". So I do not understand what it is accomplishing to make a
> > commit at all here.
>
> It seems as if the test has been written without understanding the raciness.
> It should commit files with different line endings on top of
> a file with mixed line endings.
> The warning should be checked (and here "git add" can be used,
> or the file can be commited directly).
> I'm not sure why the test ended up in doing both.
>
> However, doing it the right way triggers a bug in convert.c,
> (some warnings are missing, so I need some days to come up
> with a proper patch)
FWIW I would strongly prefer to use the warning of `git add` and not even
bother with `git commit`. What we are interested in is the warning
message, generated by convert_to_git(). Not using the first one and
triggering a second one merely adds unnecessary churn that increases the
CO2 budget of running the test.
On that matter, I wonder whether there would be a chance to revamp t0027
in a major way, with the following goals:
- to make it very obvious to the casual reader what is being tested
- to combine Git invocations when possible, e.g. running one big `git add`
on a couple of files and then verify the relevant parts of the output
- dramatically decreasing the time required to run the test, without
sacrificing correctness (I would wager a bet that not only a few of
those 1388 test cases essentially exercise identical code paths)
Ciao,
Dscho
next prev parent reply other threads:[~2016-08-10 19:16 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
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 [this message]
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=alpine.DEB.2.20.1608101423160.4924@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--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).