Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/57437 )
Change subject: tests: Revise mock chip definition and usage ......................................................................
Patch Set 4:
(5 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/57437/comment/4a98c823_50bdcd8d PS3, Line 7: tests: Make chip definitions static global
The summary line should somehow cover all the changes. If you […]
Done, I also upgraded commit message to mention everything that is going on here
File tests/chip.c:
https://review.coreboot.org/c/flashrom/+/57437/comment/d78479c2_7112e9c8 PS3, Line 24: #define CHIP_TOTAL_SIZE 8388608
Please make use of the KiB/MiB macros. This should be `(8*MiB)` (usually […]
Wow useful macros. I didn't know of them, probably because I was looking into flashchips.c which doesn't use those macros.
One thing I wanted to ask: I didn't use macros for chip_W25Q128_V, I wanted it to look closer to flashchips.c definition, am I right?
https://review.coreboot.org/c/flashrom/+/57437/comment/406feaff_0ef53cf2 PS3, Line 24: CHIP_TOTAL_SIZE
There's another chip below with a different size. Should we name it […]
Done, I only made it a little bit shorter, MOCK_CHIP_SIZE.
https://review.coreboot.org/c/flashrom/+/57437/comment/e0a8b26d_0a6aa52f PS3, Line 128: static struct flashchip chip_8MiB = {
Should we make them `const` and then work on a copy on the stack? […]
I followed your advice exactly (made them const, and fresh copy for every test), but please tell me if this implementation is what you had in mind. For example, it is not a deep copy.
https://review.coreboot.org/c/flashrom/+/57437/comment/9d8d982d_e130299a PS3, Line 130: .total_size = 8 * 1024,
CHIP_TOTAL_SIZE / KiB
Done