diff options
author | Daniel Campello <campello@chromium.org> | 2022-03-15 14:19:34 -0600 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-03-21 02:10:20 +0000 |
commit | f31650b23b4b80f86b7fe0ec879984439a32838c (patch) | |
tree | 36c6824f810d002987639982b0294cde36e9ad11 /tests/meson.build | |
parent | dfa7451bf1d88f671edabca49be9a7d45fd05f93 (diff) | |
download | flashrom-f31650b23b4b80f86b7fe0ec879984439a32838c.tar.gz flashrom-f31650b23b4b80f86b7fe0ec879984439a32838c.tar.bz2 flashrom-f31650b23b4b80f86b7fe0ec879984439a32838c.zip |
tests: add more mock wrappers
This change allows for tests to run when the compiler is inlining some
other interfaces. This happens when compiling on the chromium chroot
environment.
* __fgets_chk() is being used instead of fgets() in
get_max_kernel_buf_size() on linux_spi.c
* __vfprintf_chk() is being used instead of fprintf() in
disable_power_management() on power.c
* __open64_2() is being used instead of open() in i2c_open_path() on
i2c_helper_linux.c
BUG=b:224828279
TEST=./test_build.sh; FEATURES=test emerge-volteer flashrom
Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: I9776104d655c37891093da08789d37e5e27700de
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62844
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/meson.build')
-rw-r--r-- | tests/meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build index 610d1c61..90e0df11 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -36,6 +36,7 @@ mocks = [ '-Wl,--wrap=sio_read', '-Wl,--wrap=open', '-Wl,--wrap=open64', + '-Wl,--wrap=__open64_2', '-Wl,--wrap=ioctl', '-Wl,--wrap=read', '-Wl,--wrap=write', @@ -56,7 +57,9 @@ mocks = [ '-Wl,--wrap=fsync', '-Wl,--wrap=fread', '-Wl,--wrap=fgets', + '-Wl,--wrap=__fgets_chk', '-Wl,--wrap=fprintf', + '-Wl,--wrap=__vfprintf_chk', '-Wl,--wrap=fclose', '-Wl,--wrap=feof', '-Wl,--wrap=ferror', |