1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

tests: add probe lifecycle test for ch341a_spi

This test upgrades mocks to simulate a read request. Read buffer
is populated with chip manufacture id and chip model id to emulate
successful probing.

TEST=ninja test

Change-Id: I0a2d5591d097435fc69719e1d9bd153433425821
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68755
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
Alexander Goncharov
2022-10-24 12:57:09 +03:00
committed by Anastasia Klimchuk
parent d0fc4e76e1
commit 67e5c6afa4
3 changed files with 47 additions and 3 deletions

View File

@ -421,6 +421,7 @@ int main(int argc, char *argv[])
cmocka_unit_test(realtek_mst_basic_lifecycle_test_success),
cmocka_unit_test(realtek_mst_no_allow_brick_test_success),
cmocka_unit_test(ch341a_spi_basic_lifecycle_test_success),
cmocka_unit_test(ch341a_spi_probe_lifecycle_test_success),
};
ret |= cmocka_run_group_tests_name("lifecycle.c tests", lifecycle_tests, NULL, NULL);