Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.

Anastasia Klimchuk uploaded patch set #4 to this change.

View Change

tests: Revise mock chip definition and usage

This patch is doing few things:

1) Makes chip definitions static global so that they can be
reused between test functions.

2) Promotes existing mock chip from 8KiB to 8MiB and eraseblocks
are expanded accordingly. Old value of 8KiB was very small and it
was confusing. Mock chip looks more realistic now.

3) Uses KiB and MiB macros from flash.h for mock chip definition

4) Renames CHIP_TOTAL_SIZE to MOCK_CHIP_SIZE to avoid confusion
(there is also a W25Q128.V chip in the tests)

5) Makes chip definitions const so that every test can work on a
fresh copy on the stack.

BUG=b:181803212
TEST=builds and ninja test

Change-Id: Ia9b5fc71e30610684e68e9aca9fb1970da8f840a
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M tests/chip.c
1 file changed, 60 insertions(+), 117 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/57437/4

To view, visit change 57437. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia9b5fc71e30610684e68e9aca9fb1970da8f840a
Gerrit-Change-Number: 57437
Gerrit-PatchSet: 4
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newpatchset