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 <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2023-11-22 21:53:07 -05:00 committed by Chris Friedt
parent 1d501a76af
commit 41b7c17ac4

View File

@ -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 */