Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_stack_fail.c File Reference

Macros

#define TIMEOUT   K_MSEC(100)
 
#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)
 
#define STACK_LEN   2
 

Functions

 K_THREAD_STACK_DEFINE (threadstack2,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static void stack_pop_fail (struct k_stack *rx_data_stack)
 
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.
 

Variables

static ZTEST_BMEM stack_data_t data [2]
 
struct k_stack stack
 
struct k_thread thread_data2
 

Macro Definition Documentation

◆ STACK_LEN

#define STACK_LEN   2

◆ STACK_SIZE

#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)

◆ TIMEOUT

#define TIMEOUT   K_MSEC(100)

Function Documentation

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( threadstack2  ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)   
)

◆ stack_pop_fail()

static void stack_pop_fail ( struct k_stack *  rx_data_stack)
static

TESTPOINT: stack pop returns -EBUSY

TESTPOINT: stack pop returns -EAGAIN

Variable Documentation

◆ data

ZTEST_BMEM stack_data_t data[2]
static

◆ stack

struct k_stack stack
extern

◆ thread_data2

struct k_thread thread_data2