Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk. Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52497 )
Change subject: tests: Add unit test to run init/shutdown for dummyflasher.c ......................................................................
Patch Set 2:
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/52497/comment/da71e440_574114d0 PS2, Line 9: I plan to do this for all drivers in programmer table, : one at a time. Dummy is the first and it does not need : mocks. : This explains a overarching strategy however is spare on the detail of the commit itself.
May I recommend something along the lines of;
``` " Introduce test to exercise that init and teardown of drivers correctly manage the drivers life-time state. We constrain ourselves to dummyflasher in particular here as it does not need any mocking. " ```
https://review.coreboot.org/c/flashrom/+/52497/comment/a42a2a1a_3a233fdf PS2, Line 13: After this was rebased on the top of memory checks : https://review.coreboot.org/c/flashrom/+/51243 , : dummy has been discovered to leak memory on shutdown, : so I fix it here. separate patch as it is not related to the introduction of the test code itself just that a previously introduced test found a bug.
File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/52497/comment/060d6f22_432457ff PS2, Line 653: free(data); Fix the memory leak in a separate patch as not to be conflated with the introduction of test code. The fix stands upon it's own merit.