Attention is currently required from: Nico Huber, Edward O'Callaghan, Anastasia Klimchuk. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56413 )
Change subject: tests: Mock file i/o for linux_mtd and linux_spi tests ......................................................................
Patch Set 6:
(2 comments)
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/56413/comment/50c606e9_0a72b1b3 PS4, Line 214: int num_bytes = 0;
Wow thank you for the whole code! I only removed `const char *data = NULL;` it seemed unused.
Well spotted, it was indeed unused. I decided to use an array of structs halfway through and didn't realize that `data` was no longer needed.
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/56413/comment/170e2324_8a7ace8c PS6, Line 237: return strlen(entry.data); Hmmm, now that I take a look at this again:
- Shouldn't we honor the `size` and `len` parameters? - `strcpy()` also copies the null terminator, so the returned value should be `strlen(entry.data) + 1`.