diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2021-11-10 00:45:09 +0200 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-05-12 03:05:37 +0000 |
commit | b728f4b9483f84eefe4cd0bd23fa9f1c71ebebc3 (patch) | |
tree | 60f7123f0fe0c0113ad3f270500e077b2b844d73 /tests/tests.c | |
parent | 3f4b62b444b01800ac07451f506986d7e612d708 (diff) | |
download | flashrom-b728f4b9483f84eefe4cd0bd23fa9f1c71ebebc3.tar.gz flashrom-b728f4b9483f84eefe4cd0bd23fa9f1c71ebebc3.tar.bz2 flashrom-b728f4b9483f84eefe4cd0bd23fa9f1c71ebebc3.zip |
tests: test write protection
Tests both WP implementation and its emulation in dummy programmer.
Change-Id: I49af7f6d173eb4c56c22d80b01a473b8c499c0f8
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59075
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/tests.c')
-rw-r--r-- | tests/tests.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/tests.c b/tests/tests.c index 6aabd908..2f955ff4 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -436,5 +436,15 @@ int main(void) }; ret |= cmocka_run_group_tests_name("chip.c tests", chip_tests, NULL, NULL); + const struct CMUnitTest chip_wp_tests[] = { + cmocka_unit_test(invalid_wp_range_dummyflasher_test_success), + cmocka_unit_test(set_wp_range_dummyflasher_test_success), + cmocka_unit_test(switch_wp_mode_dummyflasher_test_success), + cmocka_unit_test(wp_init_from_status_dummyflasher_test_success), + cmocka_unit_test(full_chip_erase_with_wp_dummyflasher_test_success), + cmocka_unit_test(partial_chip_erase_with_wp_dummyflasher_test_success), + }; + ret |= cmocka_run_group_tests_name("chip_wp.c tests", chip_wp_tests, NULL, NULL); + return ret; } |