Re: [PATCH] mktag tests: fix broken "&&" chain

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

 



On Sun, Mar 7, 2021 at 3:43 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:
> > -                     test_must_fail git mktag --no-strict <tag.sig 2>message.no-strict &&xb
> > +                     test_must_fail git mktag --no-strict <tag.sig 2>message.no-strict &&
> >                       grep '$2' message.no-strict
>
> I do not think the chainlint check is designed to deal with helper
> functions, but I wonder why nobody noticed a runtime failure.  Is
> this an unused/dead codepath?

The `git mktag` invocation would still have produced the expected
stderr output regardless of what happens later (by "later", I mean the
failing invocation of the non-existent `xb` command), which means that
the subsequent `grep` will find what it's looking for, making the
function succeed as expected.

Someone looking at the verbose output might have had a chance of
spotting the "xp: not found" error message, but there likely wasn't
any reason to scan the verbose output since the test succeeded.



[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