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/+/59741 )
Change subject: tests: Add run_probe_lifecycle and use it in dummyflasher test ......................................................................
Patch Set 1:
(1 comment)
File tests/lifecycle.c:
https://review.coreboot.org/c/flashrom/+/59741/comment/e4e8dd53_4c312fe3 PS1, Line 53: printf("Testing flashrom_flash_probe for programmer=%s, chip=%s ... \n", prog->name, chip_name); : assert_int_equal(0, flashrom_flash_probe(&flashctx, flashprog, chip_name)); : printf("... flashrom_flash_probe for programmer=%s successful\n", prog->name); technically this block is the real meaning of the test and the rest is mostly almost exact the same as run_basic_lifecycle() and so perhaps could we just consume a function pointer into a internal run_lifecycle() function that does the following pattern:
run_lifecylcle(): init() fx() deinit() .
This way all the lifecycle test variants call this with their particular fx() intermediate details such as the above probe block.
This avoids duplication and makes the foundations of this test infrastructure far more extensible for other contributions.