From 94f91ef864b56ba71445b3e4d84f4b12f066aed2 Mon Sep 17 00:00:00 2001 From: Nikolai Artemiev Date: Tue, 8 Feb 2022 16:56:02 +1100 Subject: tests: add fprintf() mock with redirection to io_mock We've seen somewhat obscure test failures where the real fprintf() function was passed a fake file returned by the fopen() mock. Although the code that caused the specific failure was cros-specific, adding an fprintf() mock should help avoid future debugging. TEST=ninja test BRANCH=none BUG=b:217661133 Change-Id: I3f8594ea24d17436a7932732d9d05416b804dc93 Signed-off-by: Nikolai Artemiev Reviewed-on: https://review.coreboot.org/c/flashrom/+/61708 Reviewed-by: Anastasia Klimchuk Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- tests/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/meson.build') diff --git a/tests/meson.build b/tests/meson.build index 5bb6ac991..2f0fc67a2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -56,6 +56,7 @@ mocks = [ '-Wl,--wrap=fsync', '-Wl,--wrap=fread', '-Wl,--wrap=fgets', + '-Wl,--wrap=fprintf', '-Wl,--wrap=fclose', '-Wl,--wrap=feof', '-Wl,--wrap=ferror', -- cgit v1.2.3