diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-11-30 14:54:10 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-03-20 22:27:37 +0000 |
commit | e2f31ca02b2495887185ff4e042b0cf078ceb0b0 (patch) | |
tree | 9bc12d54c70f870520c97f0332aac81d697ced3e | |
parent | e539d112cd12ba5d3967b6956af1d91e5bf674a8 (diff) | |
download | flashrom-e2f31ca02b2495887185ff4e042b0cf078ceb0b0.tar.gz flashrom-e2f31ca02b2495887185ff4e042b0cf078ceb0b0.tar.bz2 flashrom-e2f31ca02b2495887185ff4e042b0cf078ceb0b0.zip |
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>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Thomas Heijligen <src@posteo.de>
-rw-r--r-- | tests/lifecycle.c | 4 | ||||
-rw-r--r-- | tests/tests.c | 2 | ||||
-rw-r--r-- | tests/tests.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/lifecycle.c b/tests/lifecycle.c index c439ff72..e48d94e1 100644 --- a/tests/lifecycle.c +++ b/tests/lifecycle.c @@ -294,7 +294,7 @@ int linux_mtd_fclose(void *state, FILE *fp) 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 }; @@ -307,7 +307,7 @@ void linux_mtd_basic_lifecycle_test_success(void **state) 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 0f160417..34c01ea0 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -368,7 +368,7 @@ int main(void) 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_basic_lifecycle_test_success), cmocka_unit_test(realtek_mst_basic_lifecycle_test_success), }; diff --git a/tests/tests.h b/tests/tests.h index 5f05abff..672ec1f3 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -46,7 +46,7 @@ void dummy_probe_lifecycle_test_success(void **state); 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_basic_lifecycle_test_success(void **state); void realtek_mst_basic_lifecycle_test_success(void **state); |