From 41b7c17ac4bd0198fc9bb3a0e55aa8d5e2fae96e Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Wed, 22 Nov 2023 21:53:07 -0500 Subject: [PATCH] tests: posix: pthread: check that pthread_atfork() exists Add a simple existence check that pthread_atfork() has some kind of implementation. The function is mandatory by all conforming POSIX systems. Signed-off-by: Christopher Friedt --- tests/posix/headers/src/pthread_h.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/posix/headers/src/pthread_h.c b/tests/posix/headers/src/pthread_h.c index d535a134693..b249c337c18 100644 --- a/tests/posix/headers/src/pthread_h.c +++ b/tests/posix/headers/src/pthread_h.c @@ -60,7 +60,7 @@ ZTEST(posix_headers, test_pthread_h) /* pthread_rwlock_t lock = PTHREAD_RWLOCK_INITIALIZER; */ /* not implemented */ if (IS_ENABLED(CONFIG_POSIX_API)) { - /* zassert_not_null(pthread_atfork); */ /* not implemented */ + zassert_not_null(pthread_atfork); zassert_not_null(pthread_attr_destroy); zassert_not_null(pthread_attr_getdetachstate); /* zassert_not_null(pthread_attr_getguardsize); */ /* not implemented */