/* * Copyright (c) 2022 Meta * * SPDX-License-Identifier: Apache-2.0 */ #include "_common.h" #ifdef CONFIG_POSIX_API #include #else #include #endif /** * @brief existence test for `` * * @note the eventfd API is not (yet) a part of POSIX. * * @see sys/eventfd.h */ ZTEST(posix_headers, test_sys_eventfd_h) { /* zassert_not_equal(-1, EFD_CLOEXEC); */ /* not implemented */ zassert_not_equal(-1, EFD_NONBLOCK); zassert_not_equal(-1, EFD_SEMAPHORE); zassert_not_equal((eventfd_t)-1, (eventfd_t)0); if (IS_ENABLED(CONFIG_POSIX_API)) { zassert_not_null(eventfd); zassert_not_null(eventfd_read); zassert_not_null(eventfd_write); } }