Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/51243 )
Change subject: Enable dynamic memory allocation checks for cmocka unit tests ......................................................................
Patch Set 7:
(4 comments)
Patchset:
PS6:
This looks quite nice now, thank you! […]
In the initial version of this patch the role of unittest.h was that without it ninja test did not build. My understanding of the whole situation is: with the last changes, test-build environment and real-build environment got closer to each other (closer than they have been before) and now -includes in meson.build are properly covering everything in test-build. So I feel this last patchset is more correct than the first (thanks!).
File meson.build:
https://review.coreboot.org/c/flashrom/+/51243/comment/3790dc5d_9e63b21c PS6, Line 477: -include
Can we have spaces after -include? That should work, I guess :)
I tried space after -include and it does not work:
cc1: fatal error: stdlib.h: No such file or directory
I checked that command line had this (as expected) '-include stdlib.h' '-include unittest_env.h' but it does not build.
File tests/helpers.c:
https://review.coreboot.org/c/flashrom/+/51243/comment/af981aee_5d1ef58c PS6, Line 21: #include <stdlib.h>
I'm not sure if we should remove this. The files under tests/ […]
I removed this one because it seems to be not needed? Yes files in tests/ do not have command line -include If it is indirectly included in one of the headers above, does it need to be explicitly included again?
File tests/meson.build:
https://review.coreboot.org/c/flashrom/+/51243/comment/ae37e987_3e81475c PS6, Line 38: '-DUNIT_TEST_ENV',
Is this still needed? Now that `unittest_env.h` is only when building […]
Yes you are right: this flag is not needed anymore in this patch. Although I may introduce it in one of the next patches (where I do lots of mocking) but here it is not needed.