git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git mailing list <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 02/10] t5812: add 'test_i18ngrep's missing filename parameter
Date: Wed, 7 Feb 2018 14:53:17 +0100	[thread overview]
Message-ID: <CAM0VKjkf=51i1YPqdNm=pyPHaNNguXLu0T1iHDYv28jW92QTow@mail.gmail.com> (raw)
In-Reply-To: <20180126182734.GB27618@sigill.intra.peff.net>

On Fri, Jan 26, 2018 at 7:27 PM, Jeff King <peff@peff.net> wrote:
> On Fri, Jan 26, 2018 at 01:37:00PM +0100, SZEDER Gábor wrote:
>
>> The second 'test_i18ngrep' invocation in the test 'curl redirects
>> respect whitelist' is missing its filename parameter.  This has
>> remained unnoticed since its introduction in f4113cac0 (http: limit
>> redirection to protocol-whitelist, 2015-09-22), because it would only
>> cause the test to fail if Git was built with a sufficiently old
>> libcurl version.  The test's two ||-chained 'test_i18ngrep'
>> invocations are supposed to check that either one of the two patterns
>> is present in 'git clone's error message.  As it happens, the first
>> invocation covers the error message from any reasonably up-to-date
>> libcurl, thus the second invocation, the one without the filename
>> parameter, isn't executed at all.  Apparently no one has run the test
>> suite's httpd tests with such an old libcurl in the last 2+ years, or
>> at least they haven't bothered to notify us about the failed test.
>
> Interesting find.
>
> The "too old" curl is older than 7.19.4, which we actually fail to build
> with since v2.12.0. So they probably did not even get as far as the
> tests. ;)

Oh, OK, I was not aware of that.  The oldest non-maintenance release
with the missing filename parameter is v2.7.0, so that's still a 5
releases time frame to notice it.

Anyway, I'm preparing v2 of this series, and I'm not sure what to do
about this.

  - Should I simply drop the "your curl version is too old" pattern?  It
    would make sense, but it just doesn't feel quite right to remove it
    while the corresponding printf() is still there, even if it can't be
    triggered anymore.  However, cleaning up the curl version checks in
    http.c to remove this message is beyond the scope of this patch
    series.

  - Or leave it almost-as-is, only dropping the now unnecessary curly
    braces as Simon pointed out.  And perhaps a bit of update to the
    commit message.

I'd prefer the second option.

>> Fix this by consolidating the two patterns into a single extended
>> regexp, eliminating the need for an ||-chained second 'test_i18ngrep'
>> invocation.
>
> OK. Once upon a time I think we had trouble with "grep -E", since some
> older systems had only "egrep". But I see we've introduced some "grep
> -E" invocations as far back as 2013 and nobody has complained, so it's
> probably fine.

Yeah, first I went with the more traditional "\(this\|that\)" pattern,
but then noticed that 'grep -E' is already used in a couple of places,
and picked the format that uses less escape characters.

  reply	other threads:[~2018-02-07 13:53 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 12:36 [PATCH 00/10] 'test_i18ngrep'-related fixes and improvements SZEDER Gábor
2018-01-26 12:36 ` [PATCH 01/10] t5541: add 'test_i18ngrep's missing filename parameter SZEDER Gábor
2018-01-26 18:23   ` Jeff King
2018-01-26 18:23     ` Jeff King
2018-01-26 12:37 ` [PATCH 02/10] t5812: " SZEDER Gábor
2018-01-26 18:27   ` Jeff King
2018-02-07 13:53     ` SZEDER Gábor [this message]
2018-02-07 14:38       ` Jeff King
2018-01-30  9:50   ` Simon Ruderich
2018-01-26 12:37 ` [PATCH 03/10] t6022: don't run 'git merge' upstream of a pipe SZEDER Gábor
2018-01-26 12:37 ` [PATCH 04/10] t4001: don't run 'git status' " SZEDER Gábor
2018-01-26 12:37 ` [PATCH 05/10] t5510: consolidate 'grep' and 'test_i18ngrep' patterns SZEDER Gábor
2018-01-26 18:16   ` Junio C Hamano
2018-01-26 19:20     ` SZEDER Gábor
2018-01-26 19:23       ` Junio C Hamano
2018-01-26 12:37 ` [PATCH 06/10] t5536: let 'test_i18ngrep' read the file without redirection SZEDER Gábor
2018-01-26 12:37 ` [PATCH 07/10] t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh' SZEDER Gábor
2018-01-26 18:19   ` Junio C Hamano
2018-01-26 18:32     ` Jeff King
2018-01-26 19:08     ` SZEDER Gábor
2018-01-26 12:37 ` [PATCH 08/10] t: forbid piping into 'test_i18ngrep' SZEDER Gábor
2018-01-26 18:24   ` Junio C Hamano
2018-01-26 18:39     ` Junio C Hamano
2018-01-26 18:43       ` Jeff King
2018-01-26 18:51     ` SZEDER Gábor
2018-01-26 19:19       ` Junio C Hamano
2018-01-26 18:41   ` Jeff King
2018-01-26 12:37 ` [PATCH 09/10] t: make sure that 'test_i18ngrep' got enough parameters SZEDER Gábor
2018-01-26 18:47   ` Jeff King
2018-01-26 22:07   ` Eric Sunshine
2018-01-26 12:37 ` [PATCH 10/10] t: make 'test_i18ngrep' more informative on failure SZEDER Gábor
2018-01-26 18:50   ` Jeff King
2018-01-26 19:23     ` SZEDER Gábor
2018-01-26 19:25       ` Jeff King
2018-01-26 20:26         ` SZEDER Gábor
2018-01-26 20:32           ` Jeff King
2018-01-26 18:51 ` [PATCH 00/10] 'test_i18ngrep'-related fixes and improvements Jeff King
2018-02-08 15:56 ` [PATCH v2 0/9] " SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 1/9] t5541: add 'test_i18ngrep's missing filename parameter SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 2/9] t5812: " SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 3/9] t6022: don't run 'git merge' upstream of a pipe SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 4/9] t4001: don't run 'git status' " SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 5/9] t5510: consolidate 'grep' and 'test_i18ngrep' patterns SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 6/9] t5536: let 'test_i18ngrep' read the file without redirection SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 7/9] t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh' SZEDER Gábor
2018-02-08 15:56   ` [PATCH v2 8/9] t: validate 'test_i18ngrep's parameters SZEDER Gábor
2018-02-08 16:34     ` Jeff King
2018-02-08 15:56   ` [PATCH v2 9/9] t: make 'test_i18ngrep' more informative on failure SZEDER Gábor
2018-02-08 16:36   ` [PATCH v2 0/9] 'test_i18ngrep'-related fixes and improvements Jeff King

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='CAM0VKjkf=51i1YPqdNm=pyPHaNNguXLu0T1iHDYv28jW92QTow@mail.gmail.com' \
    --to=szeder.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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.
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).