From fac9fc28f5a6cadf7c94264f429faa597a2058ac Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Thu, 2 Jun 2022 11:56:38 +1000 Subject: tests: Use regular cmocka wraps for hwaccess functions hwaccess functions used to be static inline functions and needed a special treatment so that they could be mocked for unit tests. This has changed, see include/hwaccess_x86_io.h now the functions are not static inline anymore, and it is possible to use regular cmocka wraps. Fixes https://ticket.coreboot.org/issues/385 BUG=b:181803212 TEST=ninja test Change-Id: Iafce071ea7ad5bcfdebbba968699d5743705f8e0 Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/64881 Tested-by: build bot (Jenkins) Reviewed-by: Joursoir Reviewed-by: Thomas Heijligen --- tests/tests.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/tests.c') diff --git a/tests/tests.c b/tests/tests.c index a719a8fd..ed833b73 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -321,14 +321,14 @@ int __wrap_rget_io_perms(void) return 0; } -void __wrap_test_outb(unsigned char value, unsigned short port) +void __wrap_OUTB(unsigned char value, unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->outb) get_io()->outb(get_io()->state, value, port); } -unsigned char __wrap_test_inb(unsigned short port) +unsigned char __wrap_INB(unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->inb) @@ -336,14 +336,14 @@ unsigned char __wrap_test_inb(unsigned short port) return 0; } -void __wrap_test_outw(unsigned short value, unsigned short port) +void __wrap_OUTW(unsigned short value, unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->outw) get_io()->outw(get_io()->state, value, port); } -unsigned short __wrap_test_inw(unsigned short port) +unsigned short __wrap_INW(unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->inw) @@ -351,14 +351,14 @@ unsigned short __wrap_test_inw(unsigned short port) return 0; } -void __wrap_test_outl(unsigned int value, unsigned short port) +void __wrap_OUTL(unsigned int value, unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->outl) get_io()->outl(get_io()->state, value, port); } -unsigned int __wrap_test_inl(unsigned short port) +unsigned int __wrap_INL(unsigned short port) { /* LOG_ME; */ if (get_io() && get_io()->inl) -- cgit v1.2.3