Attention is currently required from: Thomas Heijligen, Anastasia Klimchuk, Peter Marheine.

Anastasia Klimchuk uploaded patch set #2 to this change.

View Change

tests: Add workaround to allow tests mock fileno on FreeBSD

fileno can be a function and a macro in FreeBSD, depending on whether
the environment in multi-threaded or single-threaded. For single
thread, macro is used. Macro is expanded into a inline code which
accesses private field of file descriptor. This is impossible to
mock in tests.

Pretending that environment is multi-threaded makes fileno function
to be called instead of a macro. Function can be mocked for tests.

BUG=b:237606255
TEST=ninja test
on two environments:
1) FreeBSD 13.1-RELEASE-p2 GENERIC amd64
2) Debian 5.17.11 x86_64 GNU/Linux

Change-Id: I3789ea9107a4cf8033cf59bb96d3c82aa58de026
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
TICKET: https://ticket.coreboot.org/issues/411
---
M tests/chip.c
1 file changed, 42 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/67312/2

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3789ea9107a4cf8033cf59bb96d3c82aa58de026
Gerrit-Change-Number: 67312
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Idwer Vollering <vidwer@gmail.com>
Gerrit-Attention: Thomas Heijligen <src@posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine@chromium.org>
Gerrit-MessageType: newpatchset