diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-11-12 16:33:16 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-02-14 03:46:54 +0000 |
commit | 9fb5812896859f5e195527d64554e44eb981eac3 (patch) | |
tree | 02b3b6e81d6621671bd735a08a8bc5c807591f38 /tests/chip.c | |
parent | 3f8d1b4f2b13eca9603c6f73b07631a7a98cc160 (diff) | |
download | flashrom-9fb5812896859f5e195527d64554e44eb981eac3.tar.gz flashrom-9fb5812896859f5e195527d64554e44eb981eac3.tar.bz2 flashrom-9fb5812896859f5e195527d64554e44eb981eac3.zip |
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 <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59238
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/chip.c')
-rw-r--r-- | tests/chip.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/chip.c b/tests/chip.c index fd7094cc..798199c3 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 <include/test.h> |