Attention is currently required from: Sam McNally, Daniel Campello. Anastasia Klimchuk 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 9:
(5 comments)
Patchset:
PS9: Few small things, this is hopefully the last iteration :)
File tests/io_mock.h:
https://review.coreboot.org/c/flashrom/+/63227/comment/0392953b_a1bfa89e PS9, Line 118: /* An alternative to custom open mock. A test can either register its : * own mock open function or fallback_open_state. */ The text of the comment is alright, but formatting needs to be adjusted. We have coding style: https://www.flashrom.org/Development_Guidelines#Coding_style which is linux coding style except of line length limits. So multi-line comment format is:
/* * An alternative to custom open mock. A test can either register its * own mock open function or fallback_open_state. */
Please check there are no trailing whitespaces, they often sneak in, especially at the end of first line /*
https://review.coreboot.org/c/flashrom/+/63227/comment/05999e8d_f13ea114 PS9, Line 120: struct io_mock_fallback_open_state *fallback_open_state; Just to double-check, did you choose longer names deliberately? I was suggesting struct fallback_open_state *fallback_open
I was trying to come up with not-so-long names for struct type and field.
You will be changing comments format... so maybe you can rename to shorter names? Unless you know there is a reason not to? Once again, my suggestion: struct fallback_open_state *fallback_open
File tests/io_mock.c:
https://review.coreboot.org/c/flashrom/+/63227/comment/c6ba4a7c_1746187a PS9, Line 24: /* A test can either register its own mock open function or : * fallback_open_state. */ This can be one-line comment. But if you prefer to keep it multi-line, please also align with the coding style (see comment above).
https://review.coreboot.org/c/flashrom/+/63227/comment/be2c93f2_71edd47d PS9, Line 26: assert_true(io == NULL || io->open == NULL || : io->fallback_open_state == NULL); This can be one line, as it was before, please return back :) Coding style allows longer line than 80 chars if it's not too much longer and helps readability. In the case I think it is.