1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

tests: Add layout tests for overlapping regions

There are no tests for layout, it would be great to add some.

Also partially inspired by
commit 06a89d7139
and commit c9039fc279

BUG=b:193584590
TEST=ninja test

Change-Id: I7aa8dc0c9bc5a22fe5deea757eea1a151b969cea
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/56324
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Anastasia Klimchuk
2021-07-15 10:04:39 +10:00
committed by Edward O'Callaghan
parent 80c3296499
commit 35e8bf64a7
4 changed files with 116 additions and 0 deletions

View File

@ -236,5 +236,12 @@ int main(void)
};
ret |= cmocka_run_group_tests_name("init_shutdown.c tests", init_shutdown_tests, NULL, NULL);
const struct CMUnitTest layout_tests[] = {
cmocka_unit_test(included_regions_dont_overlap_test_success),
cmocka_unit_test(included_regions_overlap_test_success),
cmocka_unit_test(region_not_included_overlap_test_success),
};
ret |= cmocka_run_group_tests_name("layout.c tests", layout_tests, NULL, NULL);
return ret;
}