|
Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Functions | |
| ZTEST_USER (pipe, test_pipe_on_single_elements) | |
| Verify pipe with 1 element insert. | |
| ZTEST_USER (pipe, test_pipe_on_multiple_elements) | |
| Test when multiple items are present in the pipe. | |
| ZTEST_USER (pipe, test_pipe_forever_wait) | |
| Test when multiple items are present with wait. | |
| ZTEST_USER (pipe, test_pipe_timeout) | |
| Test pipes with timeout. | |
| ZTEST_USER (pipe, test_pipe_get_on_empty_pipe) | |
| Test pipe get from a empty pipe. | |
| ZTEST_USER (pipe, test_pipe_forever_timeout) | |
| Test the pipe_get with K_FOREVER as timeout. | |
| ZTEST_USER (pipe, test_pipe_get_timeout) | |
| k_pipe_get timeout test | |
| ZTEST_USER (pipe, test_pipe_get_invalid_size) | |
| Test pipe get of invalid size. | |
| ZTEST_USER (pipe, test_pipe_get_min_xfer) | |
| Test pipe get returns immediately if >= min_xfer is available. | |
| ZTEST_USER (pipe, test_pipe_put_min_xfer) | |
| Test pipe put returns immediately if >= min_xfer is available. | |
| ZTEST (pipe, test_pipe_define_at_runtime) | |
| Test defining and initializing pipes at run time. | |
| ZTEST (pipe, test_pipe_flush) | |
| Test flushing a pipe. | |
| ZTEST (pipe_api_1cpu, test_pipe_thread2thread) | |
| Test pipe data passing between threads. | |
| ZTEST_USER (pipe_api_1cpu, test_pipe_user_thread2thread) | |
| Test data passing using pipes between user threads. | |
| ZTEST (pipe_api, test_resource_pool_auto_free) | |
| Test resource pool free. | |
| static void | tThread_half_pipe_put (void *p1, void *p2, void *p3) |
| static void | tThread_half_pipe_get (void *p1, void *p2, void *p3) |
| ZTEST (pipe_api, test_half_pipe_put_get) | |
| Test put/get with smaller pipe buffer. | |
| ZTEST (pipe_api, test_pipe_get_put) | |
| ZTEST (pipe_api, test_pipe_get_large) | |
| ZTEST (pipe_api, test_pipe_reader_wait) | |
| Test pending reader in pipe. | |
| ZTEST (pipe_api_1cpu, test_pipe_put_fail) | |
| Test pipe put failure scenario. | |
| ZTEST_USER (pipe_api_1cpu, test_pipe_user_put_fail) | |
| Test pipe put by a user thread. | |
| ZTEST (pipe_api, test_pipe_get_fail) | |
| Test pipe get failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_user_get_fail) | |
| Test pipe get by a user thread. | |
| ZTEST_USER (pipe_api, test_pipe_alloc_not_init) | |
| Test k_pipe_alloc_init() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_get_null) | |
| Test k_pipe_get() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_get_unreach_data) | |
| Test k_pipe_get() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_get_unreach_size) | |
| Test k_pipe_get() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_put_null) | |
| Test k_pipe_put() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_put_unreach_data) | |
| Test k_pipe_put() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_put_unreach_size) | |
| Test k_pipe_put() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_read_avail_null) | |
| Test k_pipe_read_avail() failure scenario. | |
| ZTEST_USER (pipe_api, test_pipe_write_avail_null) | |
| Test k_pipe_write_avail() failure scenario. | |
| static ZTEST_DMEM unsigned char | data [] = "abcdefgh" |
| Tests for the Pipe read / write availability. | |
| static struct k_pipe | pipe |
| static struct k_pipe | bufferless |
| static struct k_pipe | bufferless1 |
| ZTEST (pipe_api, test_pipe_avail_no_buffer) | |
| Pipes with no buffer or size 0 should return 0 bytes available. | |
| ZTEST (pipe_api, test_pipe_avail_r_lt_w) | |
| Test available read / write space for r < w. | |
| ZTEST (pipe_api, test_pipe_avail_w_lt_r) | |
| Test available read / write space for w < r. | |
| ZTEST (pipe_api, test_pipe_avail_r_eq_w_empty) | |
Test available read / write space for r == w and an empty buffer. | |
| ZTEST (pipe_api, test_pipe_avail_r_eq_w_full) | |
Test available read / write space for r == w and a full buffer. | |
|
static |
|
static |
| ZTEST | ( | pipe | , |
| test_pipe_define_at_runtime | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test defining and initializing pipes at run time.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
| ZTEST | ( | pipe | , |
| test_pipe_flush | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test flushing a pipe.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
| ZTEST | ( | pipe_api | , |
| test_half_pipe_put_get | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
Test put/get with smaller pipe buffer.
TESTPOINT: thread-thread data passing via pipe
| ZTEST | ( | pipe_api | , |
| test_pipe_avail_no_buffer | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Pipes with no buffer or size 0 should return 0 bytes available.
Pipes can be created to be bufferless (i.e. k_pipe::buffer is NULL or k_pipe::size is 0).
If either of those conditions is true, then k_pipe_read_avail and k_pipe_write_avail should return 0.
| ZTEST | ( | pipe_api | , |
| test_pipe_avail_r_eq_w_empty | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Test available read / write space for r == w and an empty buffer.
This test case is for buffered k_pipe objects and covers the case where k_pipe::read_index is equal to k_pipe::write_index and k_pipe::bytes_used is zero.
In this case, k_pipe::bytes_used is relevant because the read and write indices are equal.
r
w
|a|b|c|d|e|f|g|h|
|0|1|2|3|4|5|6|7|
Regardless of whether the buffer is full or empty, the following holds:
r_avail = bytes_used w_avail = N - bytes_used
Thus: r_avail = 0 would read:
w_avail = N - 0 = 8 would overwrite: e f g h a b c d
| ZTEST | ( | pipe_api | , |
| test_pipe_avail_r_eq_w_full | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Test available read / write space for r == w and a full buffer.
This test case is for buffered k_pipe objects and covers the case where k_pipe::read_index is equal to k_pipe::write_index and k_pipe::bytes_used is equal to k_pipe::size.
In this case, k_pipe::bytes_used is relevant because the read and write indices are equal.
r
w
|a|b|c|d|e|f|g|h|
|0|1|2|3|4|5|6|7|
Regardless of whether the buffer is full or empty, the following holds:
r_avail = bytes_used w_avail = N - bytes_used
Thus r_avail = N = 8 would read: e f g h a b c d
w_avail = N - 8 = 0 would overwrite:
| ZTEST | ( | pipe_api | , |
| test_pipe_avail_r_lt_w | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Test available read / write space for r < w.
This test case is for buffered k_pipe objects and covers the case where k_pipe::read_index is less than k_pipe::write_index.
In this case, k_pipe::bytes_used is not relevant.
r w |a|b|c|d|e|f|g|h| |0|1|2|3|4|5|6|7|
As shown above, the pipe will be able to read 3 bytes without blocking and write 5 bytes without blocking.
Thus r_avail = w - r = 3 would read: a b c d
w_avail = N - (w - r) = 5 would overwrite: e f g h
| ZTEST | ( | pipe_api | , |
| test_pipe_avail_w_lt_r | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Test available read / write space for w < r.
This test case is for buffered k_pipe objects and covers the case where k_pipe::write_index is less than k_pipe::read_index.
In this case, k_pipe::bytes_used is not relevant.
w r |a|b|c|d|e|f|g|h| |0|1|2|3|4|5|6|7|
As shown above, the pipe will fbe able to read 5 bytes without blocking and write 3 bytes without blocking.
Thus r_avail = N - (r - w) = 5 would read: e f g h
w_avail = r - w = 3 would overwrite: a b c d
| ZTEST | ( | pipe_api | , |
| test_pipe_get_fail | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test pipe get failure scenario.
| ZTEST | ( | pipe_api | , |
| test_pipe_get_large | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
TESTPOINT: thread-thread data passing via pipe
| ZTEST | ( | pipe_api | , |
| test_pipe_get_put | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
TESTPOINT: thread-thread data passing via pipe
| ZTEST | ( | pipe_api | , |
| test_pipe_reader_wait | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
Test pending reader in pipe.
| ZTEST | ( | pipe_api | , |
| test_resource_pool_auto_free | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
Test resource pool free.
| ZTEST | ( | pipe_api_1cpu | , |
| test_pipe_put_fail | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test pipe put failure scenario.
| ZTEST | ( | pipe_api_1cpu | , |
| test_pipe_thread2thread | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
Test pipe data passing between threads.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
TESTPOINT: test k_pipe_init pipe
TESTPOINT: test K_PIPE_DEFINE pipe
| ZTEST_USER | ( | pipe | , |
| test_pipe_forever_timeout | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test the pipe_get with K_FOREVER as timeout.
Testcase is similar to test_pipe_on_single_elements() but with K_FOREVER as timeout.
| ZTEST_USER | ( | pipe | , |
| test_pipe_forever_wait | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test when multiple items are present with wait.
| ZTEST_USER | ( | pipe | , |
| test_pipe_get_invalid_size | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test pipe get of invalid size.
| ZTEST_USER | ( | pipe | , |
| test_pipe_get_min_xfer | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test pipe get returns immediately if >= min_xfer is available.
| ZTEST_USER | ( | pipe | , |
| test_pipe_get_on_empty_pipe | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test pipe get from a empty pipe.
| ZTEST_USER | ( | pipe | , |
| test_pipe_get_timeout | |||
| ) |
| ZTEST_USER | ( | pipe | , |
| test_pipe_on_multiple_elements | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test when multiple items are present in the pipe.
transfer sequences of bytes of data in part.
| ZTEST_USER | ( | pipe | , |
| test_pipe_on_single_elements | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Verify pipe with 1 element insert.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
| ZTEST_USER | ( | pipe | , |
| test_pipe_put_min_xfer | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test pipe put returns immediately if >= min_xfer is available.
| ZTEST_USER | ( | pipe | , |
| test_pipe_timeout | |||
| ) |
#include <tests/kernel/pipe/pipe/src/test_pipe.c>
Test pipes with timeout.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_alloc_not_init | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_alloc_init() failure scenario.
See what will happen if an uninitialized k_pipe is passed to k_pipe_alloc_init().
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_get_null | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_get() failure scenario.
See what will happen if an uninitialized k_pipe is passed to k_pipe_get().
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_get_unreach_data | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_get() failure scenario.
See what will happen if the parameter address is accessed deny to test k_pipe_get
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_get_unreach_size | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_get() failure scenario.
See what will happen if the parameter address is accessed deny to test k_pipe_get
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_put_null | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_put() failure scenario.
See what will happen if a null pointer is passed into the k_pipe_put as a parameter
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_put_unreach_data | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_put() failure scenario.
See what will happen if the parameter address is accessed deny to test k_pipe_put
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_put_unreach_size | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_put() failure scenario.
See what will happen if the parameter address is accessed deny to test k_pipe_put
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_read_avail_null | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_read_avail() failure scenario.
See what will happen if a null pointer is passed into the k_pipe_read_avail as a parameter
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_user_get_fail | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test pipe get by a user thread.
| ZTEST_USER | ( | pipe_api | , |
| test_pipe_write_avail_null | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test k_pipe_write_avail() failure scenario.
See what will happen if a null pointer is passed into the k_pipe_write_avail as a parameter
| ZTEST_USER | ( | pipe_api_1cpu | , |
| test_pipe_user_put_fail | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_fail.c>
Test pipe put by a user thread.
| ZTEST_USER | ( | pipe_api_1cpu | , |
| test_pipe_user_thread2thread | |||
| ) |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c>
Test data passing using pipes between user threads.
TESTPOINT: test k_object_alloc pipe
TESTPOINT: test k_pipe_alloc_init
|
static |
|
static |
|
static |
#include <tests/kernel/pipe/pipe_api/src/test_pipe_avail.c>
Tests for the Pipe read / write availability.
|
static |