Attention is currently required from: Aarya, Anastasia Klimchuk, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/84078?usp=email )
Change subject: tests: Check verify op completed in full if chip memory modified ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2: There are a few changes in the new patchset:
1) Stronger requirement on verify: verify records cleared after each modification. In cases when the memory area is erased, and then written, we want to ensure verification happens after write, not just after erase. 2) FLASHROM_FLAG_VERIFY_AFTER_WRITE turned ON for all usual cases 3) FLASHROM_FLAG_VERIFY_AFTER_WRITE turned OFF for protected region test cases, verify op called manually after write. (because protected region not supposed to be modified) 4) protected region in the test changed to be only write-protected , read allowed, to be able to do verification 5) fixed a bug in post-processing of unaligned region when the end region needs to be extended. newcontents are supposed to be restored, but there was 1-off error.
How do 3 and 4 work in real life? Is the test close enough to real life?
Commit Message:
https://review.coreboot.org/c/flashrom/+/84078/comment/e7c9094a_a0bf0fe5?usp... : PS1, Line 18: Note: at the moment the test is not fully working, the following : write test cases fail (all erase test cases pass):
Looks like it might be a fencepost error (possibly treating the upper bound of a region as exclusive […]
This specific error was because verify_after_write flag was off! It is turned on in cli_classic, but tests are calling libflashrom directly, so the flag needs to be explicitly turned on.
The only verification that happened without the flag, was coming from after the erase operation, because erase ignores the flags :)
I found a fencepost bug in the other place though! (in erasure_layout.c)