Attention is currently required from: Sam McNally, Anastasia Klimchuk. Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63227 )
Change subject: tests: assert pathname and flags when calling open() ......................................................................
Patch Set 8:
(9 comments)
File tests/io_mock.h:
https://review.coreboot.org/c/flashrom/+/63227/comment/e44127f5_69e6076b PS7, Line 63: /* Maximum number of open to mock. */
The number is probably arbitrary? If yes, you can add this clarification into a comment, "the number […]
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/06c81af6_e5e58bbd PS7, Line 64: 3
If you are in a good mood, let's make this number power of two :) like 4 for example.
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/ff1d6d32_d196095b PS7, Line 118: struct io_mock_open_state *open_state;
This is, as I understand from the code, an alternative to custom open mocking, and mutually exclusiv […]
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/3c268acc_14f17be0 PS7, Line 118: open_state
Another thing: could you please add a comment above this line, to explain what that is, something li […]
Done
File tests/io_mock.c:
https://review.coreboot.org/c/flashrom/+/63227/comment/856dd67c_adc058e1 PS7, Line 24: assert_true(io == NULL || io->open == NULL || io->open_state == NULL);
I would also add a comment above this line, to make it crystal clear: […]
Done
File tests/tests.c:
https://review.coreboot.org/c/flashrom/+/63227/comment/bd3f049f_04c0d4d8 PS7, Line 77: wrap_open_and_friends
Lets just call it "mock_open"
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/e143ef3f_94edc560 PS7, Line 81:
Could you please add new line between two conditionals? It would be easier to read.
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/e1b38623_17442d84 PS7, Line 84:
Also here, please add new line between declaration of flags and asserts
Done
https://review.coreboot.org/c/flashrom/+/63227/comment/bb603491_5e96e357 PS7, Line 91:
Also here, please add new line before return statement.
Done