Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/59743 )
Change subject: tests: Upgrade linux_mtd test to run probe lifecycle ......................................................................
tests: Upgrade linux_mtd test to run probe lifecycle
No additional mocks are needed, because linux_mtd is doing most of the job in init function.
BUG=b:181803212 TEST=ninja test
Change-Id: I74436f36f628680c22c7225b1584f06464307775 Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M tests/lifecycle.c M tests/tests.c M tests/tests.h 3 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/43/59743/1
diff --git a/tests/lifecycle.c b/tests/lifecycle.c index d25681a..b733f62 100644 --- a/tests/lifecycle.c +++ b/tests/lifecycle.c @@ -273,7 +273,7 @@ return 0; }
-void linux_mtd_basic_lifecycle_test_success(void **state) +void linux_mtd_probe_lifecycle_test_success(void **state) { #if CONFIG_LINUX_MTD == 1 struct linux_mtd_io_state linux_mtd_io_state = { NULL }; @@ -286,7 +286,7 @@
io_mock_register(&linux_mtd_io);
- run_basic_lifecycle(state, &programmer_linux_mtd, ""); + run_probe_lifecycle(state, &programmer_linux_mtd, "", "Opaque flash chip");
io_mock_register(NULL); #else diff --git a/tests/tests.c b/tests/tests.c index 3d9ef5f..6e398a1 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -353,7 +353,7 @@ cmocka_unit_test(nicrealtek_basic_lifecycle_test_success), cmocka_unit_test(raiden_debug_basic_lifecycle_test_success), cmocka_unit_test(dediprog_basic_lifecycle_test_success), - cmocka_unit_test(linux_mtd_basic_lifecycle_test_success), + cmocka_unit_test(linux_mtd_probe_lifecycle_test_success), cmocka_unit_test(linux_spi_probe_lifecycle_test_success), cmocka_unit_test(realtek_mst_basic_lifecycle_test_success), }; diff --git a/tests/tests.h b/tests/tests.h index f77f9e5..21b8d07 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -45,7 +45,7 @@ void nicrealtek_basic_lifecycle_test_success(void **state); void raiden_debug_basic_lifecycle_test_success(void **state); void dediprog_basic_lifecycle_test_success(void **state); -void linux_mtd_basic_lifecycle_test_success(void **state); +void linux_mtd_probe_lifecycle_test_success(void **state); void linux_spi_probe_lifecycle_test_success(void **state); void realtek_mst_basic_lifecycle_test_success(void **state);