[NSWI004] Why are assertions ignored in test mode.

Jan Kytka kytka.honza at gmail.com
Thu Nov 12 19:47:27 CET 2020


Hello,

Is there a good reason, why are regular assertions ignored when the kernel
is built for testing?

i.e shouldn't the lines 28,29 in include/debug.h:
28    #ifdef KERNEL_DEBUG
29    #define assert(expr) \

be more like this?
28    #if defined(KERNEL_DEBUG) || defined(KERNEL_TEST)
29    #define assert(expr) \

My point is: if my code has a bug in it, I shouldn't allow the tests to let
it pass.

Thanks
Jan Kytka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20201112/9d62a28f/attachment.htm>


More information about the NSWI004 mailing list