Re: [PATCH 13/19] tests: apply modern idiom for signaling test failure

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

 



On Fri, Dec 10, 2021 at 4:32 AM Jeff King <peff@xxxxxxxx> wrote:
> On Thu, Dec 09, 2021 at 12:11:09AM -0500, Eric Sunshine wrote:
> >       if test -s difference
> >       then
> >               cat difference
> > -             (exit 1)
> > +             false
> >       else
> >               echo happy
> >       fi
>
> ...I'd have said the idiom here is just:
>
>   git diff-tree -r test-rebase test-merge >difference &&
>   test -s difference
>
> The extra "cat" and "happy" are verbose output that we usually skip in
> favor of letting "-x" logging do the talking (and leaving the failed
> state so you can "cat difference" yourself).
>
> That said, I'm OK with this minimal change in the name of keeping creep
> out of the series.

Indeed, there's plenty of odd cruft like this in old test scripts
which could eventually use good cleanups such as the one you suggest
here. But I'm also OK with (indeed prefer) this minimal change for the
present in order to reduce likelihood of reviewer fatigue in this
already lengthy patch series.



[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