Skip to content

Commit

Permalink
posix: Implement tests for pthread_attr_setscope and pthread_attr_get…
Browse files Browse the repository at this point in the history
…scope

Add tests for for `pthread_attr_setscope()`
and `pthread_attr_getscope()`

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
  • Loading branch information
moonlight83340 committed Feb 2, 2024
1 parent 7237491 commit 2289548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/posix/headers/src/pthread_h.c
Expand Up @@ -53,8 +53,8 @@ ZTEST(posix_headers, test_pthread_h)
zassert_not_equal(-1, PTHREAD_PROCESS_SHARED);
zassert_not_equal(-1, PTHREAD_PROCESS_PRIVATE);

/* zassert_not_equal(-1, PTHREAD_SCOPE_PROCESS); */ /* not implemented */
/* zassert_not_equal(-1, PTHREAD_SCOPE_SYSTEM); */ /* not implemented */
zassert_not_equal(-1, PTHREAD_SCOPE_PROCESS);
zassert_not_equal(-1, PTHREAD_SCOPE_SYSTEM);

pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
Expand All @@ -68,7 +68,7 @@ ZTEST(posix_headers, test_pthread_h)
/* zassert_not_null(pthread_attr_getinheritsched); */ /* not implemented */
zassert_not_null(pthread_attr_getschedparam);
zassert_not_null(pthread_attr_getschedpolicy);
/* zassert_not_null(pthread_attr_getscope); */ /* not implemented */
zassert_not_null(pthread_attr_getscope);
zassert_not_null(pthread_attr_getstack);
zassert_not_null(pthread_attr_getstacksize);
zassert_not_null(pthread_attr_init);
Expand All @@ -77,7 +77,7 @@ ZTEST(posix_headers, test_pthread_h)
/* zassert_not_null(pthread_attr_setinheritsched); */ /* not implemented */
zassert_not_null(pthread_attr_setschedparam);
zassert_not_null(pthread_attr_setschedpolicy);
/* zassert_not_null(pthread_attr_setscope); */ /* not implemented */
zassert_not_null(pthread_attr_setscope);
zassert_not_null(pthread_attr_setstack);
zassert_not_null(pthread_attr_setstacksize);
zassert_not_null(pthread_barrier_destroy);
Expand Down

0 comments on commit 2289548

Please sign in to comment.