Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS

Tests for the LIFO kernel object. More...

Functions

void test_lifo_thread2thread (void)
 test thread to thread data passing via lifo More...
 
void test_lifo_thread2isr (void)
 test isr to thread data passing via lifo More...
 
void test_lifo_isr2thread (void)
 test thread to isr data passing via lifo More...
 
void test_lifo_get_fail (void *p1, void *p2, void *p3)
 Test LIFO get fail. More...
 
void test_lifo_loop (void)
 Verify zephyr lifo continuous read write in loop. More...
 
static void test_thread_timeout_reply_values (void *p1, void *p2, void *p3)
 try getting data on lifo with special timeout value, return result in lifo More...
 
static void test_thread_timeout_reply_values_wfe (void *p1, void *p2, void *p3)
 
static void test_thread_put_timeout (void *p1, void *p2, void *p3)
 A thread sleeps then puts data on the lifo. More...
 
static void test_lifo_nowait (void)
 Test last in, first out queue using LIFO. More...
 
static void test_lifo_wait (void)
 Test pending reader in LIFO. More...
 
static void test_timeout_empty_lifo (void)
 Test reading empty LIFO. More...
 
static void test_timeout_non_empty_lifo (void)
 Test read and write operation in LIFO with timeout. More...
 
static void test_timeout_lifo_thread (void)
 Test LIFO with timeout. More...
 
void test_thread_pend_and_timeout (void *p1, void *p2, void *p3)
 a thread pends on a lifo then times out More...
 
static void test_timeout_threads_pend_on_lifo (void)
 Test multiple pending readers in LIFO. More...
 
static void test_para_init (void)
 Test LIFO initialization with various parameters. More...
 

Detailed Description

Tests for the LIFO kernel object.

Verify zephyr fifo apis under different context

Function Documentation

◆ test_lifo_get_fail()

void test_lifo_get_fail ( void p1,
void p2,
void p3 
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_fail.c>

Test LIFO get fail.

verify zephyr k_lifo_get, it returns NULL when there is no data to read

See also
k_lifo_init(), k_lifo_get()

TESTPOINT: lifo get returns NULL

◆ test_lifo_isr2thread()

void test_lifo_isr2thread ( void  )

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test thread to isr data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: test k_lifo_init lifo

TESTPOINT: test K_LIFO_DEFINE lifo

◆ test_lifo_loop()

void test_lifo_loop ( void  )

#include <tests/kernel/lifo/lifo_api/src/test_lifo_loop.c>

Verify zephyr lifo continuous read write in loop.

  • Test Steps
    1. lifo put from main thread
    2. lifo read from isr
    3. lifo put from isr
    4. lifo get from spawn thread
    5. loop above steps for LOOPs times
  • Expected Results
    1. lifo data pass correctly and stably across contexts
See also
k_lifo_init(), k_fifo_put(), k_fifo_get()

◆ test_lifo_nowait()

static void test_lifo_nowait ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test last in, first out queue using LIFO.

See also
k_sem_init(), k_lifo_put(), k_lifo_get()

◆ test_lifo_thread2isr()

void test_lifo_thread2isr ( void  )

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test isr to thread data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: init via k_lifo_init

TESTPOINT: test K_LIFO_DEFINEed lifo

◆ test_lifo_thread2thread()

void test_lifo_thread2thread ( void  )

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test thread to thread data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: init via k_lifo_init

TESTPOINT: test K_LIFO_DEFINEed lifo

◆ test_lifo_wait()

static void test_lifo_wait ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test pending reader in LIFO.

See also
k_lifo_init(), k_lifo_get(), k_lifo_put()

◆ test_para_init()

static void test_para_init ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test LIFO initialization with various parameters.

See also
k_lifo_init(), k_lifo_put()

◆ test_thread_pend_and_timeout()

void test_thread_pend_and_timeout ( void p1,
void p2,
void p3 
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

a thread pends on a lifo then times out

See also
k_lifo_put(), k_lifo_get()

◆ test_thread_put_timeout()

static void test_thread_put_timeout ( void p1,
void p2,
void p3 
)
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

A thread sleeps then puts data on the lifo.

See also
k_lifo_put()

◆ test_thread_timeout_reply_values()

static void test_thread_timeout_reply_values ( void p1,
void p2,
void p3 
)
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

try getting data on lifo with special timeout value, return result in lifo

See also
k_lifo_put()

◆ test_thread_timeout_reply_values_wfe()

static void test_thread_timeout_reply_values_wfe ( void p1,
void p2,
void p3 
)
static

◆ test_timeout_empty_lifo()

static void test_timeout_empty_lifo ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test reading empty LIFO.

See also
k_lifo_get()

◆ test_timeout_lifo_thread()

static void test_timeout_lifo_thread ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test LIFO with timeout.

See also
k_lifo_put(), k_lifo_get()

◆ test_timeout_non_empty_lifo()

static void test_timeout_non_empty_lifo ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test read and write operation in LIFO with timeout.

See also
k_lifo_put(), k_lifo_get()

◆ test_timeout_threads_pend_on_lifo()

static void test_timeout_threads_pend_on_lifo ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test multiple pending readers in LIFO.

test multiple threads pending on the same lifo with different timeouts

See also
k_lifo_get()