Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/57436 )
Change subject: tests: Extract setup and teardown for chip tests ......................................................................
Patch Set 2:
(3 comments)
File tests/chip.c:
https://review.coreboot.org/c/flashrom/+/57436/comment/18597c46_62899783 PS1, Line 29: g_chip_state
I wonder if it is time to embed this into `data` of the flashctx to avoid possible test coupling. […]
Good idea, totally makes sense! I was going to do it quickly, but then I realised I don't know how to implement it? There is no `data` in flashctx struct, there is one in spi_master (which dummy uses). Data in spi_master is already used and owned by a programmer. I need to think about it, I don't know how to do it quickly in this patch :\
https://review.coreboot.org/c/flashrom/+/57436/comment/ea5d6082_6c378562 PS1, Line 89: static void reset_global_chip_state() : { : g_chip_state.unlock_calls = 0; : }
Just inline this function to the one call site. […]
Done! This was actually a historical artefact from old version when there was no setup function :)
https://review.coreboot.org/c/flashrom/+/57436/comment/2d4c2250_ea6edf5d PS1, Line 94: setup_for_chip
+1 drop the _for_ just `setup_chip()`
Done