All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org, peff@peff.net, Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v1 1/2] t0027: Correct raciness in NNO test
Date: Sat, 13 Aug 2016 21:18:05 +0000	[thread overview]
Message-ID: <20160813211805.GA10624@tb-raspi> (raw)
In-Reply-To: <57AF4FCB.7090409@kdbg.org>

On Sat, Aug 13, 2016 at 06:50:19PM +0200, Johannes Sixt wrote:
> Am 12.08.2016 um 18:51 schrieb tboegi@web.de:
> >From: Torsten Bögershausen <tboegi@web.de>
> >
> >When a non-reversible CRLF conversion is done in "git add",
> >a warning is printed on stderr (or Git dies, depending on checksafe)
> >
> >The function commit_chk_wrnNNO() in t0027 was written to test this,
> >but did the wrong thing: Instead of looking at the warning
> >from "git add", it looked at the warning from "git commit".
> >
> >This is racy because "git commit" may not have to do CRLF conversion
> >at all if it can use the sha1 value from the index (which depends on
> >whether "add" and "commit" run in a single second).
> >
> >Correct this and replace the commit for each and every file with a commit
> >of all files in one go.
> 
> The new test code does not only fix the race condition, but also
> tests different things, or prepares test cases in a different
> manner. I would have appreciated an explanation why this is
> necessary. Is it "on my machine, the race condition was triggered
> consistently for a bunch of tests, and so I recorded the wrong
> expected output in the test cases"?
> 
Good point. The origanal intention was to let t0027 pass, and fix
the bug in convert.c in a later commit.
(and rename NNO in a 3rd commit, that is postponed until we figured this out).

Looking at t0027, it turns out that the changes in the test matrix done in 1/2
are reverted in 2/2.
This is not a good thing.
Either (a) they should be marked as test_expect_failure in 1/2 and
corrected in 2/2,
or (b) 1/2 and 2/2 are squashed together and the noise in t0027 is minimal.
I'll send a patch for (b) in a second.

  reply	other threads:[~2016-08-14 11:23 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=20160813211805.GA10624@tb-raspi \
    --to=tboegi@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.