Attention is currently required from: Daniel Campello. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63193 )
Change subject: tests: use MOCK_FD instead of NON_ZERO ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/63193/comment/093c924a_e1ec6c37 PS3, Line 9: return a non-negative value for : the file descriptor expected from open operations.
to fail if there is no `open()` mocked in a test
Oh definitely not intentional. NON_ZERO was intended to represent a valid (successful) return value. What I think has happened, the value of NON_ZERO was taken too large (not intentionally) and it overflows to negative value.
It is possible those too (NON_ZERO and MOCK_FD) can be converged into one macro, but I would better do it later in a separate patch. Realtek test was using its own mock fd anyway (although I forgot why).