aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tests.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-11-30 13:02:41 +1100
committerAnastasia Klimchuk <aklm@chromium.org>2022-03-20 22:41:53 +0000
commit78221212fa06faf82dd799c027e3a9f198354835 (patch)
tree54da7c21dd18a2d4853eaac2e1ba736b36e8f457 /tests/tests.c
parente2f31ca02b2495887185ff4e042b0cf078ceb0b0 (diff)
downloadflashrom-78221212fa06faf82dd799c027e3a9f198354835.tar.gz
flashrom-78221212fa06faf82dd799c027e3a9f198354835.tar.bz2
flashrom-78221212fa06faf82dd799c027e3a9f198354835.zip
tests: Upgrade linux_spi test to run probe lifecycle
This test adds a mock for linux_spi ioctl and mocks it for read request. Read buffer is populated with chip manufacture id and chip model id to emulate successful probing. BUG=b:181803212 TEST=ninja test Change-Id: I32d8e972d99b52c2b18f688aa6aeae75dd170f72 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/59742 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'tests/tests.c')
-rw-r--r--tests/tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tests.c b/tests/tests.c
index 34c01ea0..f1fb3f3e 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -369,7 +369,7 @@ int main(void)
cmocka_unit_test(raiden_debug_basic_lifecycle_test_success),
cmocka_unit_test(dediprog_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(linux_spi_probe_lifecycle_test_success),
cmocka_unit_test(realtek_mst_basic_lifecycle_test_success),
};
ret |= cmocka_run_group_tests_name("lifecycle.c tests", lifecycle_tests, NULL, NULL);