summaryrefslogtreecommitdiffstats
path: root/tests/meson.build
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-02-08 16:56:02 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-02-14 02:32:04 +0000
commit94f91ef864b56ba71445b3e4d84f4b12f066aed2 (patch)
tree441b021a80093694dc054ed1fa84e351f9ce0621 /tests/meson.build
parenta8be6dace8ace92210c6423ca26c545c8b9e991f (diff)
downloadflashrom-94f91ef864b56ba71445b3e4d84f4b12f066aed2.tar.gz
flashrom-94f91ef864b56ba71445b3e4d84f4b12f066aed2.tar.bz2
flashrom-94f91ef864b56ba71445b3e4d84f4b12f066aed2.zip
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 <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/61708 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build1
1 files changed, 1 insertions, 0 deletions
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',