Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Tests for queue. More...
Macros | |
#define | QUEUE_NUM 10 |
Verify that multiple queues can be defined simultaneously. More... | |
Tests for queue.
#define QUEUE_NUM 10 |
#include <tests/kernel/queue/src/test_queue_contexts.c>
Verify that multiple queues can be defined simultaneously.
define multiple queues to verify they can work.
#include <tests/kernel/queue/src/test_queue_user.c>
Test to verify free of allocated elements of queue.
#include <tests/kernel/queue/src/test_queue_contexts.c>
Test queue alloc append and prepend.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_alloc_append() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_user.c>
verify feature of queue "First In, First Out"
Create a new queue And allocated memory for the queue Initialize and insert data item in sequence. Verify the feather "First in,First out"
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_alloc_prepend() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_user.c>
verify allocate and feature "Last In, First Out"
Create a new queue And allocated memory for the queue Initialize and insert data item in sequence. Verify the feather "Last in,First out"
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_append_list() failure scenario.
Accroding to the API k_queue_append_list to design some error condition to verify error branch of the API.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_merge_slist() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_contexts.c>
Verify k_queue_get()
TESTPOINT: test k_queue_init queue
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_get() failure scenario.
TESTPOINT: queue get returns NULL
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_get() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_init() failure scenario.
Verify that the parameter of API k_queue_init() is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_is_empty() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_contexts.c>
Verify data passing between ISR and thread.
Create a new ISR and ready for getting data And current thread is used for inserting data Verify if the rx_data is equal insert-data address.
TESTPOINT: test k_queue_init queue
TESTPOINT: test K_QUEUE_DEFINE queue
#include <tests/kernel/queue/src/test_queue_loop.c>
Test queue operations in loop.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_merge_slist() failure scenario.
Verify the API k_queue_merge_slist when a slist is empty or a slist's tail is null.
#include <tests/kernel/queue/src/test_queue_contexts.c>
Test multi-threads to get data from a queue.
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:
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_peek_head() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_fail.c>
Test k_queue_peek_tail() failure scenario.
Verify that the parameter of the API is NULL, what will happen.
#include <tests/kernel/queue/src/test_queue_user.c>
Verify queue elements and cancel wait from a user thread.
The test adds elements to queue and then verified by the child user thread. Get data from a empty queue,and use K_FORVER to wait for available And to cancel wait from current thread.
#include <tests/kernel/queue/src/test_queue_contexts.c>
Verify data passing between thread and ISR.
Create a new ISR to insert data And current thread is used for getting data Verify if the rx_data is equal insert-data address. If the received data address is the same as the created array, prove that the queue data structures are stored within the provided data items.
TESTPOINT: init via k_queue_init
TESTPOINT: test K_QUEUE_DEFINEed queue
#include <tests/kernel/queue/src/test_queue_contexts.c>
Verify data passing between threads using queue.
Static define and Dynamic define queues, Then initialize them. Create a new thread to wait for reading data. Current thread will append item into queue. Verify if rx_data is equal insert-data address. Verify queue can be define at compile time.
TESTPOINT: init via k_queue_init
TESTPOINT: test K_QUEUE_DEFINEed queue