Re: [PATCH 15/16] Revert and amend "test-lib-functions: assert correct parameter count"

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

 



SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:

> ...  suppress '-x' output
> from test helper functions, and then this issue will become moot
> anyway.

That is certainly a better approach than tweaking each call site of
BUG.

The interface to BUG is "write a code to determine condition and
then die by calling BUG", which means under '-x' you are bound to
see the trace from "code to determine condition" part.

I wonder if introducing a BUG_ON helper function that

 - turns off '-x' trace upon entry;
 - takes a condition as one of its arguments and evals it;
 - issues a message and dies if needed;
 - otherwise arranges to turn '-x' trace on and return.

would solve it well?

Thanks.




[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