diff --git a/tests/posix/common/src/_main.c b/tests/posix/common/src/_main.c index 8ecb328c50f6c7..264b2e403fd780 100644 --- a/tests/posix/common/src/_main.c +++ b/tests/posix/common/src/_main.c @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include +#include + ZTEST_SUITE(posix_apis, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/posix/common/src/clock.c b/tests/posix/common/src/clock.c index f32dbdb3ba90f3..154fa6c8da075d 100644 --- a/tests/posix/common/src/clock.c +++ b/tests/posix/common/src/clock.c @@ -3,10 +3,11 @@ * * SPDX-License-Identifier: Apache-2.0 */ +#include +#include +#include + #include -#include -#include -#include #define SLEEP_SECONDS 1 #define CLOCK_INVALID -1 diff --git a/tests/posix/common/src/cond.c b/tests/posix/common/src/cond.c index 04bf666b610350..76794f43a4e12b 100644 --- a/tests/posix/common/src/cond.c +++ b/tests/posix/common/src/cond.c @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - #include +#include + /** * @brief Test to demonstrate limited condition variable resources * diff --git a/tests/posix/common/src/fnmatch.c b/tests/posix/common/src/fnmatch.c index aa400b55f75c40..0d33f634183bac 100644 --- a/tests/posix/common/src/fnmatch.c +++ b/tests/posix/common/src/fnmatch.c @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include + #include /* diff --git a/tests/posix/common/src/key.c b/tests/posix/common/src/key.c index af6d1d1b58fc69..ff01617f6985fd 100644 --- a/tests/posix/common/src/key.c +++ b/tests/posix/common/src/key.c @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include -#include #include + #include +#include #define N_THR 2 #define N_KEY 2 diff --git a/tests/posix/common/src/mqueue.c b/tests/posix/common/src/mqueue.c index 15e43c6e92e0aa..74c16da6bfd54a 100644 --- a/tests/posix/common/src/mqueue.c +++ b/tests/posix/common/src/mqueue.c @@ -4,14 +4,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include -#include -#include #include -#include #include #include +#include +#include + #define N_THR 2 #define STACKSZ (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) #define SENDER_THREAD 0 diff --git a/tests/posix/common/src/mutex.c b/tests/posix/common/src/mutex.c index 36750cea2a35f4..dae40cdc779097 100644 --- a/tests/posix/common/src/mutex.c +++ b/tests/posix/common/src/mutex.c @@ -5,11 +5,10 @@ */ #include +#include #include -#include - #define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) static K_THREAD_STACK_DEFINE(stack, STACK_SIZE); @@ -56,7 +55,7 @@ void *recursive_mutex_entry(void *p1) * and pthread_mutex_lock are tested with mutex type being * normal. */ -ZTEST(posix_apis, test_normal_mutex) +ZTEST(posix_apis, test_mutex_normal) { pthread_t thread_1; pthread_attr_t attr; @@ -112,7 +111,7 @@ ZTEST(posix_apis, test_normal_mutex) * twice and unlocked for the same number of time. * */ -ZTEST(posix_apis, test_recursive_mutex) +ZTEST(posix_apis, test_mutex_recursive) { pthread_t thread_2; pthread_attr_t attr2; diff --git a/tests/posix/common/src/nanosleep.c b/tests/posix/common/src/nanosleep.c index 2e611004d765cd..3039f5c33c9be0 100644 --- a/tests/posix/common/src/nanosleep.c +++ b/tests/posix/common/src/nanosleep.c @@ -4,11 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include -#include #include +#include + #include +#include /** req and rem are both NULL */ ZTEST(posix_apis, test_nanosleep_NULL_NULL) diff --git a/tests/posix/common/src/pthread.c b/tests/posix/common/src/pthread.c index e8d013bfbfa549..1bf029fb04d5dc 100644 --- a/tests/posix/common/src/pthread.c +++ b/tests/posix/common/src/pthread.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include -#include #include #include + #include +#include #ifndef min #define min(a, b) ((a) < (b)) ? (a) : (b) @@ -411,7 +411,7 @@ ZTEST(posix_apis, test_pthread_execution) printk("Barrier test OK\n"); } -ZTEST(posix_apis, test_pthread_error_condition) +ZTEST(posix_apis, test_pthread_errors_errno) { pthread_attr_t attr; struct sched_param param; diff --git a/tests/posix/common/src/rwlock.c b/tests/posix/common/src/rwlock.c index 67fc45016672ab..aebf459c323e5c 100644 --- a/tests/posix/common/src/rwlock.c +++ b/tests/posix/common/src/rwlock.c @@ -4,9 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include + #include +#include #define N_THR 3 #define STACKSZ (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) @@ -53,7 +54,7 @@ static void *thread_top(void *p1) return NULL; } -ZTEST(posix_apis, test_posix_rw_lock) +ZTEST(posix_apis, test_rw_lock) { int32_t i, ret; pthread_attr_t attr[N_THR]; diff --git a/tests/posix/common/src/semaphore.c b/tests/posix/common/src/semaphore.c index 8a12d8c917592a..622a34dc0736df 100644 --- a/tests/posix/common/src/semaphore.c +++ b/tests/posix/common/src/semaphore.c @@ -4,11 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include #include #include +#include + #define STACK_SIZE 1024 sem_t sema; diff --git a/tests/posix/common/src/sleep.c b/tests/posix/common/src/sleep.c index a4d3392b1e6e2f..ba25d02d023e03 100644 --- a/tests/posix/common/src/sleep.c +++ b/tests/posix/common/src/sleep.c @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include + #include struct waker_work { diff --git a/tests/posix/common/src/timer.c b/tests/posix/common/src/timer.c index 668871b6aa2f39..c736ace18c705c 100644 --- a/tests/posix/common/src/timer.c +++ b/tests/posix/common/src/timer.c @@ -4,10 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include #include +#include + #define SECS_TO_SLEEP 2 #define DURATION_SECS 1 #define DURATION_NSECS 0