1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00
Edward O'Callaghan 999bbb32ae tests/lifecycle.c: Deduce out io-setup-teardown do-pattern
The following do-block is quite error prone to do manually,
```
  io_mock_register(&XXX_io);
  run_probe_lifecycle(state, &XXX, "", "..");
  io_mock_register(NULL);
```.

Hence, deduce out the common pattern and fold up into the common
worker function to handle state machine setup and teardown in a
consistent way.

BUG=b:227521116
TEST=`ninja test`.

Change-Id: Icc00acd980a027337acb079f5afc3cccdfe4c765
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63231
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Daniel Campello <campello@chromium.org>
2022-04-12 23:59:49 +00:00
..
2022-02-18 03:39:40 +00:00
2022-03-21 02:10:20 +00:00