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

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>
This commit is contained in:
Sergii Dmytruk
2021-11-10 00:45:09 +02:00
committed by Anastasia Klimchuk
parent 3f4b62b444
commit b728f4b948
4 changed files with 344 additions and 0 deletions

View File

@ -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;
}