Skip to content

Commit

Permalink
tests: kernel: fix test groups for semaphore/mutex
Browse files Browse the repository at this point in the history
define groups for semaphores and mutexes

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Sep 17, 2024
1 parent d80174f commit 3744dd8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions tests/kernel/mutex/mutex_api/src/test_mutex_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ static struct k_thread tdata;
static struct k_thread tdata2;
static struct k_thread tdata3;



/**
* @defgroup kernel_mutex_tests Mutexes
* @ingroup all_tests
* @{
* @}
*/

static void tThread_entry_lock_forever(void *p1, void *p2, void *p3)
{
zassert_false(k_mutex_lock((struct k_mutex *)p1, K_FOREVER) == 0,
Expand Down
10 changes: 9 additions & 1 deletion tests/kernel/semaphore/semaphore/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
#include <zephyr/irq_offload.h>
#include <zephyr/ztest_error_hook.h>


/**
* @defgroup kernel_semaphore_tests Semaphores
* @ingroup all_tests
* @{
* @}
*/

/* Macro declarations */
#define SEM_INIT_VAL (0U)
#define SEM_MAX_VAL (10U)
Expand Down Expand Up @@ -271,7 +279,7 @@ ZTEST(semaphore, test_sem_thread2isr)
}

/**
* @brief Test semaphore initialization at running time
* @brief Test semaphore initialization at runtime
* @details
* - Initialize a semaphore with valid count and max limit.
* - Initialize a semaphore with invalid max limit.
Expand Down

0 comments on commit 3744dd8

Please sign in to comment.