diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2023-03-11 20:26:55 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2023-03-16 22:39:38 +0000 |
commit | 028099dbfd92e62eb0c6227d1194ff714f55e67c (patch) | |
tree | 5843a94251f60bb59f15ab3f93a319432c2ac3ff /tests | |
parent | 9fea866ad15748809ff0c75bc591349a31a8b6f4 (diff) | |
download | flashrom-028099dbfd92e62eb0c6227d1194ff714f55e67c.tar.gz flashrom-028099dbfd92e62eb0c6227d1194ff714f55e67c.tar.bz2 flashrom-028099dbfd92e62eb0c6227d1194ff714f55e67c.zip |
tests: Add wrap for __fstat50 to fix tests for NetBSD
Tested by running unit tests on
NetBSD 9.2
Ubuntu 22.04.1 (still pass)
Change-Id: Icb8e453328cb40ab9d628f01ecdc3886a233dad5
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Tested-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/meson.build | 1 | ||||
-rw-r--r-- | tests/tests.c | 6 | ||||
-rw-r--r-- | tests/wraps.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build index 2de4ee8aa..df866d732 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -60,6 +60,7 @@ mocks = [ '-Wl,--wrap=__xstat64', '-Wl,--wrap=fstat', '-Wl,--wrap=fstat64', + '-Wl,--wrap=__fstat50', '-Wl,--wrap=__fxstat', '-Wl,--wrap=__fxstat64', '-Wl,--wrap=fileno', diff --git a/tests/tests.c b/tests/tests.c index 911cf471a..d296a9832 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -229,6 +229,12 @@ int __wrap_fstat64(int fd, void *buf) return 0; } +int __wrap___fstat50(int fd, void *buf) +{ + LOG_ME; + return 0; +} + int __wrap___fxstat(int fd, void *buf) { LOG_ME; diff --git a/tests/wraps.h b/tests/wraps.h index 6cc956777..089d99274 100644 --- a/tests/wraps.h +++ b/tests/wraps.h @@ -46,6 +46,7 @@ int __wrap___xstat(const char *path, void *buf); int __wrap___xstat64(const char *path, void *buf); int __wrap_fstat(int fd, void *buf); int __wrap_fstat64(int fd, void *buf); +int __wrap___fstat50(int fd, void *buf); int __wrap___fxstat(int fd, void *buf); int __wrap___fxstat64(int fd, void *buf); char *__wrap_fgets(char *buf, int len, FILE *fp); |