Attention is currently required from: Jakub Czapiga, Jan Dabros. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51804 )
Change subject: include/assert.h: Use mock_assert() for ENV_TEST targets ......................................................................
Patch Set 1:
(2 comments)
File src/include/assert.h:
https://review.coreboot.org/c/coreboot/+/51804/comment/53289643_b3f0234d PS1, Line 12: #include <tests/test.h> Probably better to just unconditionally (re-)define the prototype for mock_assert() rather than conditionally include the header here. That way, you can use
if (ENV_TEST) mock_assert(...)
in the code and don't have to use so many preprocessor guards.
https://review.coreboot.org/c/coreboot/+/51804/comment/91bb9dc5_501ddfef PS1, Line 67: #define assert(statement) mock_assert(statement, #statement, __FILE__, __LINE__) Please add this to all forms of assert (e.g. I'd say BUG() is just another form of assert for us), e.g. by inserting it before the FATAL_ASSERTS checks above. Maybe useful to factor the whole checking for FATAL_ASSERTS to do hlt() and checking for ENV_TEST to do mock_assert() out into a separate macro.