diff --git a/tests/posix/common/src/_main.c b/tests/posix/common/src/_main.c index 264b2e403f..cfec4adbd4 100644 --- a/tests/posix/common/src/_main.c +++ b/tests/posix/common/src/_main.c @@ -4,8 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - #include -ZTEST_SUITE(posix_apis, NULL, NULL, NULL, NULL, NULL); +extern bool fdtable_fd_is_initialized(int fd); + +static void *setup(void) +{ + /* ensure that the the stdin, stdout, and stderr fdtable entries are initialized */ + zassert_true(fdtable_fd_is_initialized(0)); + zassert_true(fdtable_fd_is_initialized(1)); + zassert_true(fdtable_fd_is_initialized(2)); + + return NULL; +} + +ZTEST_SUITE(posix_apis, NULL, setup, NULL, NULL, NULL);