Re: [PATCH 1/3] commit-graph tests: fix error-hiding graph_git_two_modes() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> 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@xxxxxxxxx>
> ---
>  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
>  }




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux