Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/51487 )
Change subject: Add unit test to run init/shutdown for enabled drivers ......................................................................
Patch Set 2:
(5 comments)
Patchset:
PS2:
Hello my reviewers and cc! What do people think of the latest version that has mocks in a separate c […]
Please split and thanks for the patience!
The dummyflasher change, for instance can be submitted without any hassle. Splitting `hwaccess.h` can be its own commit, and the introduction of LOG_ME() likewise. The former can be tested by comparing binaries.
File hwaccess_io_unittest.h:
PS2: Move into `tests/`?
https://review.coreboot.org/c/flashrom/+/51487/comment/a471b70b_c2835431 PS2, Line 24: #ifndef __HWACCESS_IO_H__ Maybe leave a comment that we intentionally use the same guard.
File tests/meson.build:
https://review.coreboot.org/c/flashrom/+/51487/comment/a873de2a_fd0fe161 PS2, Line 36: '-Wl,--wrap=test_outb', : '-Wl,--wrap=test_inb', : '-Wl,--wrap=test_outw', : '-Wl,--wrap=test_inw', : '-Wl,--wrap=test_outl', : '-Wl,--wrap=test_inl', I guess as these are not implemented anywhere, we don't need to "wrap" them? i.e. without these lines and s/__wrap_test_/test_/ in `tests.c`, I'd expect it to work too.
We could leave it as is though, for uniformity.
File tests/tests.c:
https://review.coreboot.org/c/flashrom/+/51487/comment/5975699b_4353155c PS2, Line 99: : 0)); This can get quite complex when additional tests are added. We can figure that out later, though.