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/+/59742 )
Change subject: tests: Upgrade linux_spi test to run probe lifecycle ......................................................................
Patch Set 4:
(3 comments)
File tests/lifecycle.c:
https://review.coreboot.org/c/flashrom/+/59742/comment/97d87212_96adb405 PS4, Line 18: #include <linux/spi/spidev.h>
This include seems inevitable... […]
IIRC, we asked this before. It depends on whether we want the tests to compile everywhere or just on Linux. I think it's fine as is for now.
If we'd guard the include, we'd also have to guard the function below that depends on it etc. If we'd want that, it would be better to put the code into a separate .c file, e.g. one specific to linux_spi tests (which wouldn't need guards inside, just the build system should only compile it when needed).
https://review.coreboot.org/c/flashrom/+/59742/comment/f9b3c865_d7e27165 PS4, Line 321: 0x40406b00 Isn't this covered by the include, something like `SPI_IOC_MESSAGE(2)`?
https://review.coreboot.org/c/flashrom/+/59742/comment/564fd459_31a2b6c4 PS4, Line 327: readcnt == 3 Checking the actual command would be more accurate and not much harder, I guess, e.g. if (msg[0].len == 1 && msg[0].tx_buf[0] == JEDEC_RDID && readcnt == 3)