Re: [PATCH v3 0/6] usage API: add and use a bug() + BUG_if_bug()

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> This series adds a bug() (lower-case) function to go along with
> BUG(). As seen in 3-5/6 this makes it much easier to handle the cases
> such as parse-options.c where we'd like to call BUG(), but would like
> to first exhaustively accumulate the N issues we spot before doing so,
> and not merely BUG() out on the first one.
>
> Changes since v2[1]:
>
>  * Fix up commentary in 1/6 to address Junio's suggestions, and
>    de-duplicate previously added commentary (just the one existing
>    comment in git-compat-util.h sufficed).
>
>  * The BUG() function itself now clears bug_called_must_BUG, as
>    suggested by Glen. This simplifies things, and allows "BUG()" to be
>    called after a sequence of "BUG()" instead of "BUG_if_bug()". That
>    pattern is now used in 6/6.
>
>    I pondered adding a message that BUG() would emit in that case,
>    i.e. to say that we'd previously called bug() and were now calling
>    BUG(), but left it. I think the result in 6/6 is better as a
>    result.
>
>  * Used "else if" in 4/6 and got rid of "break" to exhaustively log
>    errors.
>
>  * Got rid of a "below the fold" part of a commit message.
>
> 1. https://lore.kernel.org/git/cover-v2-0.6-00000000000-20220531T164806Z-avarab@xxxxxxxxx/

I didn't look too closely at patch 1/6 (since I'm not too familiar with
the trace2 stuff), but everything else looks great :)

(not sure if this is enough to give a Reviewed-By)




[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