summaryrefslogtreecommitdiffstats
path: root/tests/tests.h
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-09-07 14:13:03 +1000
committerNico Huber <nico.h@gmx.de>2021-10-01 11:28:57 +0000
commit1f62b8346efdf3a62ab5781c835946bb9c990810 (patch)
tree0b855144d748e2ea51a7e01fa2bbf1e1413d5c10 /tests/tests.h
parent2d538d87eb19cbc29891bf2221846262032e95aa (diff)
downloadflashrom-1f62b8346efdf3a62ab5781c835946bb9c990810.tar.gz
flashrom-1f62b8346efdf3a62ab5781c835946bb9c990810.tar.bz2
flashrom-1f62b8346efdf3a62ab5781c835946bb9c990810.zip
tests: Add tests to read from chip
Two tests cover the code which performs do_read operation. First one works with fake chip and dummy programmer. Fake chip has all operations defined, and a buffer to emulate chip memory. Second one uses the chip which is closer to the real one, because read/write/unlock/erase operations are real. The tests takes the advantage of dummyflasher's capability of emulating a W25Q128.V chip. BUG=b:181803212 TEST=builds and ninja test Change-Id: Ia57781ebc670c7bd6197e56fe8a20651a425c756 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/57326 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'tests/tests.h')
-rw-r--r--tests/tests.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tests.h b/tests/tests.h
index 8e1b6da60..c142b45f8 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -59,5 +59,7 @@ void layout_region_invalid_range_test_success(void **state);
/* chip.c */
void erase_chip_test_success(void **state);
void erase_chip_with_dummyflasher_test_success(void **state);
+void read_chip_test_success(void **state);
+void read_chip_with_dummyflasher_test_success(void **state);
#endif /* TESTS_H */