Attention is currently required from: Nikolai Artemiev.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69130 )
Change subject: tests: ensure chip erase operation is executed ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
File include/flash.h:
https://review.coreboot.org/c/flashrom/+/69130/comment/83e009de_c566bf8a PS1, Line 159: #define UNERASED_VALUE(flash)
It's a useful counterpart to `ERASED_VALUE()` and it might be helpful for erase optimization code et […]
The thoughts I had: we have ERASED_VALUE which is one value (for a given chip), but technically unerased value is any other value which is not ERASED_VALUE. Like for a real chip, there could be any data written. There is no such operation as "unerase chip". For unit tests, yes it makes sense to create a mock "unerased chip memory" with just one and the same "unerased value".
If everyone else agrees, I am fine to have the macro here.