All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Ramsay Jones <ramsay@ramsayjones.plus.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep
Date: Tue, 13 Feb 2018 09:08:44 -0800	[thread overview]
Message-ID: <xmqqr2porf4z.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180213100437.15685-1-szeder.dev@gmail.com> ("SZEDER =?utf-8?Q?G=C3=A1bor=22's?= message of "Tue, 13 Feb 2018 11:04:37 +0100")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> A third possible fix, which is also in the "we don't care about the
> order of multiple warning messages" camp and has a nice looking
> diffstat, would be something like this:

Hmph, we are running a "git fetch" locally and observing the error
output from both "fetch" and its counterpart "upload-pack", aren't
we?  The "fetch" instances that are run with test_must_fail are
expected to stop talking to "upload-pack" by detecting an error and
severe the connection abruptly---depending on the relative timing
between the processes, the other side may try to read and diagnose
"the remote end hung up unexpectedly", no?  

I think "grep -v" filtering is an attempt to protect the test from
getting confused by that output, but is it safe not to worry about
it these days?

> diff --git a/t/t5536-fetch-conflicts.sh b/t/t5536-fetch-conflicts.sh
> index 2e42cf3316..91f28c2f78 100755
> --- a/t/t5536-fetch-conflicts.sh
> +++ b/t/t5536-fetch-conflicts.sh
> @@ -18,14 +18,6 @@ setup_repository () {
>  	)
>  }
>  
> -verify_stderr () {
> -	cat >expected &&
> -	# We're not interested in the error
> -	# "fatal: The remote end hung up unexpectedly":
> -	test_i18ngrep -E '^(fatal|warning):' <error | grep -v 'hung up' >actual | sort &&
> -	test_i18ncmp expected actual
> -}
> -
>  test_expect_success 'setup' '
>  	git commit --allow-empty -m "Initial" &&
>  	git branch branch1 &&
> @@ -48,9 +40,7 @@ test_expect_success 'fetch conflict: config vs. config' '
>  		"+refs/heads/branch2:refs/remotes/origin/branch1" && (
>  		cd ccc &&
>  		test_must_fail git fetch origin 2>error &&
> -		verify_stderr <<-\EOF
> -		fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
> -		EOF
> +		test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
>  	)
>  '

  reply	other threads:[~2018-02-13 17:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12  0:18 [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep Ramsay Jones
2018-02-12 20:18 ` Junio C Hamano
2018-02-12 21:12   ` Junio C Hamano
2018-02-13  1:58   ` Ramsay Jones
2018-02-13  7:51     ` Junio C Hamano
2018-02-13 10:04       ` SZEDER Gábor
2018-02-13 17:08         ` Junio C Hamano [this message]
2018-02-13 17:26           ` Jeff King
2018-02-13 18:10             ` Junio C Hamano
2018-02-27 20:16               ` Junio C Hamano
2018-02-27 22:05                 ` Junio C Hamano
2018-02-27 23:47                   ` Ramsay Jones
2018-02-28  0:42                     ` SZEDER Gábor
2018-02-28 15:33                       ` Ramsay Jones
2018-02-28 16:18                         ` Junio C Hamano

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=xmqqr2porf4z.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.com \
    --cc=szeder.dev@gmail.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.
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.