1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-03 06:53:18 +02:00

tests: Add prefix to io_mock functions not to clash with macros

Flashrom I/O mock functions need to be renamed so that they do not
have name clash with standard I/O, because the latter are allowed
to be macros. Adding a prefix to flashrom mock functions avoids
them being accidentally expanded. Standard I/O functions are
expanded and flashrom mocks stay as they are.

BUG=b:237606255
TEST=ninja test
1) gcc 12.2.0 on Debian
2) clang 15.0 on Chromium OS

Ticket: https://ticket.coreboot.org/issues/411
Change-Id: I7998a8fb1b9e65621e12adbfab5460a245d5606b
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68433
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Anastasia Klimchuk
2022-10-17 11:59:09 +11:00
parent 0a896424ab
commit af2ba601f4
8 changed files with 43 additions and 43 deletions

View File

@ -108,9 +108,9 @@ void parade_lspcon_basic_lifecycle_test_success(void **state)
};
const struct io_mock parade_lspcon_io = {
.state = &parade_lspcon_io_state,
.ioctl = parade_lspcon_ioctl,
.read = parade_lspcon_read,
.write = parade_lspcon_write,
.iom_ioctl = parade_lspcon_ioctl,
.iom_read = parade_lspcon_read,
.iom_write = parade_lspcon_write,
.fallback_open_state = &parade_lspcon_fallback_open_state,
};