Attention is currently required from: Paul Menzel, Julius Werner, Jan Dabros. Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57708 )
Change subject: libpayload: Add mock architecture ......................................................................
Patch Set 9:
(6 comments)
File payloads/libpayload/Kconfig:
https://review.coreboot.org/c/coreboot/+/57708/comment/895b4706_a3f96cd6 PS7, Line 480: default y
That's because this doesn't have prompt string (after the `bool`) so it's not a "visible"/user-chang […]
Ooooh. It works! Thanks. I made it using reverse-dependencies (select <option> if <expresion>)
File payloads/libpayload/Kconfig:
https://review.coreboot.org/c/coreboot/+/57708/comment/a1e96dde_d715e1ad PS8, Line 125: MOCK
This could look a bit nicer (e.g. "Mock architecture (for unit tests)").
Done
File payloads/libpayload/Makefile:
https://review.coreboot.org/c/coreboot/+/57708/comment/6a4146af_2c900314 PS8, Line 162: host
mock
Done
https://review.coreboot.org/c/coreboot/+/57708/comment/0dae483e_9f6faaa4 PS8, Line 164: host
ditto
Done
File payloads/libpayload/arch/mock/head.c:
https://review.coreboot.org/c/coreboot/+/57708/comment/d9830f67_a7bb468d PS8, Line 3: /* This file is empty on purpose. It should not be used. */
Then why does it exist? I still don't get it. […]
It has to stay, because of the target:
# payloads/libpayload/Makefile.inc ... $(obj)/head.o: $(obj)/arch/$(ARCHDIR-y)/head.head.o.o ...
As well as the `install` and `all` (indirectly) targets containing it in dependencies. To remove it I'd have to make head.o presence dependent on the CONFIG_LP_ARCH_*, and that would unnecessarily complicate main makefiles.
File payloads/libpayload/include/mock/arch/io.h:
https://review.coreboot.org/c/coreboot/+/57708/comment/042a7d7e_8e9b2b18 PS8, Line 7:
Maybe explain that tests are expected to implement mocks for these if they want to test code that ca […]
Good idea. Without comment one might think, that missing implementation is not expected by default.