Jan Dabros has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41045 )
Change subject: tests: Add test.h default header and fix --gc-sections ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/41045/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/41045/1/tests/Makefile.inc@17 PS1, Line 17: -include $(src)/include/rules.h -include $(testsrc)/include/test.h While I really like your optimization, with putting all necessary headers into test.h, my personal opinion is to not use too many non-explicit magic, where it doesn't bring too many benefit. I mean, typing "#include <test.h>" line in every test is not a big deal, but may help developers to easily follow the logic of where all these cmocka*/assert* functions come from and why they get all necessary stdlib headers included.
That being said, I'm also fine with merging this in the shape which you proposed.
https://review.coreboot.org/c/coreboot/+/41045/1/tests/Makefile.inc@41 PS1, Line 41: subdirs:= tests/arch tests/commonlib tests/console tests/cpu tests/device Let's use newly-introduced $(testsrc) here.