Re: [PATCH v2 0/3] diff: build parseopts array on demand

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

 



On Thu, Dec 1, 2022 at 2:11 PM René Scharfe <l.s.r@xxxxxx> wrote:
> t4205-log-pretty-formats.sh                      (Wstat: 256 Tests: 21 Failed: 0)
>   Non-zero exit status: 1
>   Parse errors: No plan found in TAP output
>
> The TAP error in t4205-log-pretty-formats.sh is fixed by the following
> patch, but I can't explain it:
>
> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
> @@ -156,7 +156,7 @@ test_expect_success 'NUL termination with --reflog --pretty=oneline' '
>         for r in $revs
>         do
>                 git show -s --pretty=oneline "$r" >raw &&
> -               cat raw | lf_to_nul || exit 1
> +               cat raw | lf_to_nul || return 1
>         done >expect &&

Makes sense. The `exit 1` undesirably causes the entire script to
abort, which means test_done() is never invoked, whereas `return 1`
makes only the test fail. `exit 1` would be appropriate inside a
subshell but there is no subshell here.



[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