Re: [PATCH 12/19] tests: fix broken &&-chains in `{...}` groups

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

 



On Fri, Dec 10, 2021 at 4:29 AM Jeff King <peff@xxxxxxxx> wrote:
> On Thu, Dec 09, 2021 at 12:11:08AM -0500, Eric Sunshine wrote:
> > Fix broken &&-chains in `{...}` groups in order to reduce the number of
> > possible lurking bugs.
>
> Seems good. This is mostly stuff we don't expect to fail (mostly
> "echo"), so I doubt they're important on their own. But getting a clean
> state for the linter _is_ important.

In this patch, I think the only &&-chain which really matters (i.e.
could hide a genuine failure if broken) is t5515-fetch-merge-logic.sh.
Aside from most of these being unlikely to fail (`echo`), most of the
exit codes are being lost down pipes anyhow. As such, I had a hard
time justifying this patch since it exists mostly to satisfy the
linter which isn't smart enough to distinguish between the cases. What
ultimately convinced me that this patch was worthwhile was (1) that
there are legitimate cases, such as t5515-fetch-merge-logic.sh, where
we really do want to be told about the broken &&-chain, and (2) that
it's easier to have a single simple rule which we can point test
authors at ("chain all your test commands with `&&`") rather than
complex rules laying out cases when you do and don't need to maintain
the &&-chain.



[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