From 9fb5812896859f5e195527d64554e44eb981eac3 Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Fri, 12 Nov 2021 16:33:16 +1100 Subject: tests: Add comprehensive comment for chip.c The following describes the two mechanisms of testing done for flash chip operations. BUG=b:181803212 TEST=ninja test Change-Id: Ie498ec55cce8460fc0b2e1fe27254d3a9f763fac Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/59238 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Edward O'Callaghan --- tests/chip.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/chip.c b/tests/chip.c index fd7094cc7..798199c3c 100644 --- a/tests/chip.c +++ b/tests/chip.c @@ -11,6 +11,18 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. + * + * This file contains tests for operations on flash chip. + * + * Two flash chip test variants are used: + * + * 1) Mock chip state backed by `g_chip_state`. + * Example of test: erase_chip_test_success. + * + * 2) Mock chip operations backed by `dummyflasher` emulation. + * Dummyflasher controls chip state and emulates read/write/unlock/erase. + * `g_chip_state` is NOT used for this type of tests. + * Example of test: erase_chip_with_dummyflasher_test_success. */ #include -- cgit v1.2.3