Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Tests for Kernel stack objects. More...
Functions | |
ZTEST_USER (stack_usage, test_single_stack_play) | |
Verify data passing between threads using single stack. | |
ZTEST_USER (stack_usage_1cpu, test_dual_stack_play) | |
Verify data passing between threads using dual stack. | |
ZTEST (stack_usage_1cpu, test_isr_stack_play) | |
Verify data passing between thread and ISR. | |
void | thread_entry_wait (void *p1, void *p2, void *p3) |
ZTEST (stack_usage, test_stack_pop_can_wait) | |
Test that the stack pop can be waited if no item available. | |
ZTEST (stack_contexts, test_stack_thread2thread) | |
Test to verify data passing between threads via stack. | |
ZTEST_USER (stack_contexts, test_stack_user_thread2thread) | |
Verifies data passing between user threads via stack. | |
ZTEST (stack_contexts, test_stack_thread2isr) | |
Verifies data passing between thread and ISR via stack. | |
ZTEST (stack_contexts, test_stack_alloc_thread2thread) | |
static void | low_prio_wait_for_stack (void *p1, void *p2, void *p3) |
static void | high_prio_t1_wait_for_stack (void *p1, void *p2, void *p3) |
static void | high_prio_t2_wait_for_stack (void *p1, void *p2, void *p3) |
ZTEST (stack_contexts, test_stack_multithread_competition) | |
Test multi-threads to get data from stack. | |
ZTEST (stack_contexts, test_stack_alloc_null) | |
Test case of requesting a buffer larger than resource pool. | |
void | tStack_pop_entry (void *p1, void *p2, void *p3) |
ZTEST (stack_fail, test_stack_pop_fail) | |
Verifies stack pop functionality. | |
ZTEST (stack_fail, test_stack_cleanup_error) | |
Verifies cleanup a stack that still be needed by another thread. | |
ZTEST (stack_fail, test_stack_push_full) | |
Verifies push a data in the full stack. | |
ZTEST_USER (stack_fail, test_stack_user_pop_fail) | |
Verifies stack pop from a user thread. | |
ZTEST_USER (stack_fail, test_stack_user_init_null) | |
Verifies stack alloc and initialize a null pointer. | |
ZTEST_USER (stack_fail, test_stack_user_init_invalid_value) | |
Verify that alloc and initialize a stack with 0 memory. | |
ZTEST_USER (stack_fail, test_stack_user_push_null) | |
Verify that push some data into a NULL pointer. | |
ZTEST_USER (stack_fail, test_stack_user_pop_null) | |
Verifies pop data from a NULL pointer. | |
ZTEST_USER (stack_fail, test_stack_user_pop_permission) | |
Verifies cleanup a stack that its data still be waited by another thread. | |
Tests for Kernel stack objects.
|
static |
|
static |
|
static |
void thread_entry_wait | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
#include <tests/kernel/stack/stack/src/main.c>
void tStack_pop_entry | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
ZTEST | ( | stack_contexts | , |
test_stack_alloc_null | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
Test case of requesting a buffer larger than resource pool.
Try to request a buffer larger than resource pool for stack, then see if returns an expected value.
ZTEST | ( | stack_contexts | , |
test_stack_alloc_thread2thread | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
TESTPOINT: thread-thread data passing via stack
Requested buffer allocation from the test pool.
ZTEST | ( | stack_contexts | , |
test_stack_multithread_competition | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
Test multi-threads to get data from stack.
Define three threads, and set a higher priority for two of them, and set a lower priority for the last one. Then Add a delay between creating the two high priority threads. Test point:
ZTEST | ( | stack_contexts | , |
test_stack_thread2isr | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
Verifies data passing between thread and ISR via stack.
TESTPOINT: test k_stack_init stack
TESTPOINT: test K_STACK_DEFINE stack
ZTEST | ( | stack_contexts | , |
test_stack_thread2thread | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
Test to verify data passing between threads via stack.
Static define and Dynamic define stacks, Then initialize them. Current thread push or pop data item into the stack. Create a new thread pop or push data item into the stack. Controlled by semaphore. Verify data passing between threads via stack And verify stack can be define at compile time.
TESTPOINT: test k_stack_init stack
TESTPOINT: test K_STACK_DEFINE stack
ZTEST | ( | stack_fail | , |
test_stack_cleanup_error | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies cleanup a stack that still be needed by another thread.
ZTEST | ( | stack_fail | , |
test_stack_pop_fail | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies stack pop functionality.
ZTEST | ( | stack_fail | , |
test_stack_push_full | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies push a data in the full stack.
ZTEST | ( | stack_usage | , |
test_stack_pop_can_wait | |||
) |
#include <tests/kernel/stack/stack/src/main.c>
Test that the stack pop can be waited if no item available.
Create and initialize a new stack Set two timeout parameters to indicate the maximum amount of time the thread will wait.
ZTEST | ( | stack_usage_1cpu | , |
test_isr_stack_play | |||
) |
#include <tests/kernel/stack/stack/src/main.c>
Verify data passing between thread and ISR.
ZTEST_USER | ( | stack_contexts | , |
test_stack_user_thread2thread | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_contexts.c>
Verifies data passing between user threads via stack.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_init_invalid_value | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verify that alloc and initialize a stack with 0 memory.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_init_null | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies stack alloc and initialize a null pointer.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_pop_fail | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies stack pop from a user thread.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_pop_null | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies pop data from a NULL pointer.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_pop_permission | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verifies cleanup a stack that its data still be waited by another thread.
ZTEST_USER | ( | stack_fail | , |
test_stack_user_push_null | |||
) |
#include <tests/kernel/stack/stack/src/test_stack_fail.c>
Verify that push some data into a NULL pointer.
ZTEST_USER | ( | stack_usage | , |
test_single_stack_play | |||
) |
#include <tests/kernel/stack/stack/src/main.c>
Verify data passing between threads using single stack.
ZTEST_USER | ( | stack_usage_1cpu | , |
test_dual_stack_play | |||
) |
#include <tests/kernel/stack/stack/src/main.c>
Verify data passing between threads using dual stack.