Re: [PATCH 2/3] t/chainlint: add test_expect_success call to test snippets

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

 



On Sat, Jul 6, 2024 at 2:09 AM Jeff King <peff@xxxxxxxx> wrote:
> >       for i in $(CHAINLINTTESTS); do \
> > -             echo "test_expect_success '$$i' '" && \
> > -             sed -e '/^# LINT: /d' chainlint/$$i.test && \
> > -             echo "'"; \
> > +             sed -e '/^# LINT: /d' chainlint/$$i.test; \
> >       done >'$(CHAINLINTTMP_SQ)'/tests && \
>
> BTW, not new in my patch, but I found it ironic that the shell snippet
> here itself violates &&-chain rules. It should "|| exit 1" inside the
> loop if a sed call fails.

Indeed, what an embarrassing oversight, especially since this loop was
added in preparation for chainlint.pl which diagnoses missing `||
exit` (or `|| return`) in loops in tests (unlike chainlint.sed which
didn't).





[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