diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2022-10-17 11:59:09 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-11-08 21:09:42 +0000 |
commit | af2ba601f4840172eb422a0f3efb5a740fb9698d (patch) | |
tree | bafcf8a04415c6833e099d1b932bb52a2dbfe550 /tests/linux_mtd.c | |
parent | 0a896424abd490d1cfdd8a582ba17c25df75a0e0 (diff) | |
download | flashrom-af2ba601f4840172eb422a0f3efb5a740fb9698d.tar.gz flashrom-af2ba601f4840172eb422a0f3efb5a740fb9698d.tar.bz2 flashrom-af2ba601f4840172eb422a0f3efb5a740fb9698d.zip |
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>
Diffstat (limited to 'tests/linux_mtd.c')
-rw-r--r-- | tests/linux_mtd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/linux_mtd.c b/tests/linux_mtd.c index 10ccb5eb..3aaa5abd 100644 --- a/tests/linux_mtd.c +++ b/tests/linux_mtd.c @@ -81,9 +81,9 @@ void linux_mtd_probe_lifecycle_test_success(void **state) }; const struct io_mock linux_mtd_io = { .state = &linux_mtd_io_state, - .fopen = linux_mtd_fopen, - .fread = linux_mtd_fread, - .fclose = linux_mtd_fclose, + .iom_fopen = linux_mtd_fopen, + .iom_fread = linux_mtd_fread, + .iom_fclose = linux_mtd_fclose, .fallback_open_state = &linux_mtd_fallback_open_state, }; |