diff --git a/tests/posix/common/src/uname.c b/tests/posix/common/src/uname.c new file mode 100644 index 00000000000000..bda6ce666ea5b7 --- /dev/null +++ b/tests/posix/common/src/uname.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023 meta + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +ZTEST(posix_apis, test_uname) +{ + struct utsname info; + + zassert_ok(uname(&info)); + zassert_ok(strncmp(info.sysname, "Zephyr", sizeof(info.sysname))); + zassert_ok(strncmp(info.machine, CONFIG_ARCH, sizeof(info.machine))); +}