Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
test_stack_fail.c File Reference
#include <ztest.h>
#include <irq_offload.h>
#include <ztest_error_hook.h>

Macros

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

Functions

 K_THREAD_STACK_DEFINE (threadstack2,(512+CONFIG_TEST_EXTRA_STACKSIZE))
 
static void stack_pop_fail (struct k_stack *stack)
 
void tStack_pop_entry (void *p1, void *p2, void *p3)
 
void test_stack_pop_fail (void)
 Verifies stack pop functionality. More...
 
void test_stack_cleanup_error (void)
 Verifies cleanup a stack that still be needed by another thread. More...
 
void test_stack_push_full (void)
 Verifies push a data in the full stack. More...
 
void test_stack_user_pop_fail (void)
 Verifies stack pop from a user thread. More...
 
void test_stack_user_init_null (void)
 Verifies stack alloc and initialize a null pointer. More...
 
void test_stack_user_init_invalid_value (void)
 Verify that alloc and initialize a stack with 0 memory. More...
 
void test_stack_user_push_null (void)
 Verify that push some data into a NULL pointer. More...
 
void test_stack_user_pop_null (void)
 Verifies pop data from a NULL pointer. More...
 
void test_stack_user_pop_permission (void)
 Verifies cleanup a stack that its data still be waited by another thread. More...
 

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_STACKSIZE)

◆ TIMEOUT

#define TIMEOUT   K_MSEC(100)

Function Documentation

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( threadstack2  ,
(512+CONFIG_TEST_EXTRA_STACKSIZE)   
)

◆ stack_pop_fail()

static void stack_pop_fail ( struct k_stack *  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