All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Glen Choo <chooglen@google.com>,
	Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH 1/3] commit-graph tests: fix error-hiding graph_git_two_modes() helper
Date: Fri, 15 Oct 2021 09:03:10 -0700	[thread overview]
Message-ID: <xmqq1r4m9sxt.fsf@gitster.g> (raw)
In-Reply-To: <patch-1.3-f74cc32ceea-20211014T233343Z-avarab@gmail.com> (=?utf-8?B?IsOGdmFyCUFybmZqw7Zyw7A=?= Bjarmason"'s message of "Fri, 15 Oct 2021 01:37:14 +0200")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> The graph_git_two_modes() helper added in 177722b3442 (commit:
> integrate commit graph with commit parsing, 2018-04-10) didn't
> &&-chain its "git commit-graph" invocations, which as can be seen with
> SANITIZE=leak will happily mark tests as passing if both of these
> commands die, since test_cmp() will be comparing two empty files.

As the chains the four invocation of this helper with &&- correctly,
this does make a difference.  Nicely spotted.


> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  t/t5318-commit-graph.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
> index 295c5bd94d2..88fbe004a38 100755
> --- a/t/t5318-commit-graph.sh
> +++ b/t/t5318-commit-graph.sh
> @@ -70,8 +70,8 @@ test_expect_success 'create commits and repack' '
>  '
>  
>  graph_git_two_modes() {
> -	git -c core.commitGraph=true $1 >output
> -	git -c core.commitGraph=false $1 >expect
> +	git -c core.commitGraph=true $1 >output &&
> +	git -c core.commitGraph=false $1 >expect &&
>  	test_cmp expect output
>  }

  reply	other threads:[~2021-10-15 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 23:37 [PATCH 0/3] commit-graph: make "verify" work with replace refs Ævar Arnfjörð Bjarmason
2021-10-14 23:37 ` [PATCH 1/3] commit-graph tests: fix error-hiding graph_git_two_modes() helper Ævar Arnfjörð Bjarmason
2021-10-15 16:03   ` Junio C Hamano [this message]
2021-10-14 23:37 ` [PATCH 2/3] commit-graph tests: fix another " Ævar Arnfjörð Bjarmason
2021-10-15 16:15   ` Junio C Hamano
2021-10-14 23:37 ` [PATCH 3/3] commit-graph: don't consider "replace" objects with "verify" Ævar Arnfjörð Bjarmason
2021-10-15 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=xmqq1r4m9sxt.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=stolee@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.