Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Tests for the FIFO kernel object. More...
Functions | |
void | test_fifo_cancel_wait (void) |
Test cancel waiting on a FIFO queue. More... | |
void | test_fifo_thread2thread (void) |
Test thread to thread data passing via fifo. More... | |
void | test_fifo_thread2isr (void) |
Test isr to thread data passing via fifo. More... | |
void | test_fifo_isr2thread (void) |
Test thread to isr data passing via fifo. More... | |
void | test_fifo_is_empty_thread (void) |
Test empty fifo. More... | |
void | test_fifo_is_empty_isr (void) |
Test empty fifo in interrupt context. More... | |
void | test_fifo_get_fail (void *p1, void *p2, void *p3) |
Test FIFO get fail. More... | |
void | test_fifo_loop (void) |
Verify zephyr fifo continuous read write in loop. More... | |
static void | test_timeout_empty_fifo (void) |
Test empty fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_non_empty_fifo (void) |
Test non empty fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_fifo_thread (void) |
Test fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_threads_pend_on_fifo (void) |
Test fifo with different timeouts. More... | |
static void | test_timeout_threads_pend_on_dual_fifos (void) |
Test multiple fifos with different timeouts. More... | |
static void | test_timeout_threads_pend_fail_on_fifo (void) |
Test same fifo with different timeouts. More... | |
static void | test_timeout_setup (void) |
Test fifo init. More... | |
static void | test_single_fifo_play (void) |
Tests single fifo get and put operation in thread context. More... | |
static void | test_dual_fifo_play (void) |
Tests dual fifo get and put operation in thread context. More... | |
static void | test_isr_fifo_play (void) |
Tests fifo put and get operation in interrupt context. More... | |
Tests for the FIFO kernel object.
Verify zephyr fifo apis under different context
#include <tests/kernel/fifo/fifo_usage/src/main.c>
Tests dual fifo get and put operation in thread context.
test Thread enters an item into fifo2, starts a Child Thread and extract an item from fifo1 once the item is there. The Child Thread will extract an item from fifo2 once the item is there and and enter an item to fifo1. The flow of control goes from Test Thread to Child Thread and so forth.
#include <tests/kernel/fifo/fifo_api/src/test_fifo_cancel.c>
Test cancel waiting on a FIFO queue.
This routine causes first thread pending on fifo (if any), to return from k_fifo_get() with NULL value (as if timeout expired).
TESTPOINT: init via k_fifo_init
TESTPOINT: test K_FIFO_DEFINEed fifo
#include <tests/kernel/fifo/fifo_api/src/test_fifo_fail.c>
Test FIFO get fail.
test zephyr fifo_get when no data to read, it should returns NULL.
TESTPOINT: fifo get returns NULL
#include <tests/kernel/fifo/fifo_api/src/test_fifo_contexts.c>
Test empty fifo in interrupt context.
TESTPOINT: check fifo is empty from isr
#include <tests/kernel/fifo/fifo_api/src/test_fifo_contexts.c>
Test empty fifo.
TESTPOINT: k_fifo_is_empty after init
TESTPONT: check fifo is empty from thread
#include <tests/kernel/fifo/fifo_api/src/test_fifo_contexts.c>
Test thread to isr data passing via fifo.
TESTPOINT: test k_fifo_init fifo
TESTPOINT: test K_FIFO_DEFINE fifo
#include <tests/kernel/fifo/fifo_api/src/test_fifo_loop.c>
Verify zephyr fifo continuous read write in loop.
#include <tests/kernel/fifo/fifo_api/src/test_fifo_contexts.c>
Test isr to thread data passing via fifo.
TESTPOINT: init via k_fifo_init
TESTPOINT: test K_FIFO_DEFINEed fifo
#include <tests/kernel/fifo/fifo_api/src/test_fifo_contexts.c>
Test thread to thread data passing via fifo.
TESTPOINT: init via k_fifo_init
TESTPOINT: test K_FIFO_DEFINEed fifo
#include <tests/kernel/fifo/fifo_usage/src/main.c>
Tests fifo put and get operation in interrupt context.
Tests the ISR interfaces. Test thread puts items into fifo2 and gives control to the Child thread. Child thread gets items from fifo2 and then puts items into fifo1. Child thread gives back control to the Test thread and Test thread gets the items from fifo1. All the Push and Pop operations happen in ISR Context.
#include <tests/kernel/fifo/fifo_usage/src/main.c>
Tests single fifo get and put operation in thread context.
Test Thread enters items into a fifo, starts the Child Thread and waits for a semaphore. Child thread extracts all items from the fifo and enters some items back into the fifo. Child Thread gives the semaphore for Test Thread to continue. Once the control is returned back to Test Thread, it extracts all items from the fifo.
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test empty fifo with timeout and K_NO_WAIT.
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test fifo with timeout and K_NO_WAIT.
In first scenario test fifo with some timeout where child thread puts data on the fifo on time. In second scenario test k_fifo_get with timeout of K_NO_WAIT and the fifo should be filled by the child thread based on the data availability on another fifo. In third scenario test k_fifo_get with timeout of K_FOREVER and the fifo should be filled by the child thread based on the data availability on another fifo.
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test non empty fifo with timeout and K_NO_WAIT.
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test fifo init.
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test same fifo with different timeouts.
test multiple threads pending on the same fifo with different timeouts but getting the data in time
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test multiple fifos with different timeouts.
test multiple threads pending on different fifos with different timeouts
#include <tests/kernel/fifo/fifo_timeout/src/main.c>
Test fifo with different timeouts.
test multiple threads pending on the same fifo with different timeouts