Attention is currently required from: Nico Huber, Paul Fagerburg, Julius Werner, Yu-Ping Wu. Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58242 )
Change subject: libpayload: Add unit-tests framework and first test case ......................................................................
Patch Set 6:
(1 comment)
File payloads/libpayload/tests/Makefile.inc:
PS4:
How likely is this?
I am working on a CBFS_VERIFICATION support in the libpayload. It requires vboot for hash functions. And that's why I want this framework to be present in the libpayload. (It's easier to test it with unit-tests than on a actual device)
Copying makefiles adds technical debt, and if we're not going to need the separate functionality later, then the tradeoff isn't worth it.
Agreed, and *then* you make the copy and have the files diverge.
Libpayload still has a separate and independent Makefiles (or it seems to be that way), which are partially identical to ones from main coreboot tree. On the other hand libpayload is somehow unique in a way it handles its config (kconfig negatives, and custom CONFIG_LP_ prefix), has different implementation of stdlib, and it contains (and installs) lpgcc wrapper for building payloads with it. There are many small but important differences between the two. So, we have two ways: Leave it as it is now, or integrate it with main coreboot tree. I think that partial integration (unit-tests only) will be harder to manage due to reasons mentioned above. I also do not *think* that full integration is currently possible. I understand your concerns about duplicated build systems. I will do my best to maintain both of them. (I already found few issues requiring fixing, while rewriting it for libpayload).
As I make these comments, please understand that I'm not *demanding* that we have a single makefile that builds the unit tests for coreboot and libpayload. I just want us to consider whether the choice we're making is the right one.
Oh..., I am sorry. I didn't think that you are demanding it. I really appreciate your involvement. Maybe my writing style is too defensive (or aggressive?) sometimes.