Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Macros | |
#define | FAIL_ALLOC_MSG_FMT "sys_bitarray_alloc with region size %i allocated incorrectly" |
#define | FAIL_ALLOC_RET_MSG_FMT "sys_bitarray_alloc with region size %i returned incorrect result" |
#define | FAIL_ALLOC_OFFSET_MSG_FMT "sys_bitarray_alloc with region size %i gave incorrect offset" |
#define | FAIL_FREE_MSG_FMT "sys_bitarray_free with region size %i and offset %i failed" |
#define | FREE 0U |
#define FAIL_ALLOC_MSG_FMT "sys_bitarray_alloc with region size %i allocated incorrectly" |
#include <tests/kernel/common/src/bitarray.c>
#define FAIL_ALLOC_OFFSET_MSG_FMT "sys_bitarray_alloc with region size %i gave incorrect offset" |
#include <tests/kernel/common/src/bitarray.c>
#define FAIL_ALLOC_RET_MSG_FMT "sys_bitarray_alloc with region size %i returned incorrect result" |
#include <tests/kernel/common/src/bitarray.c>
#define FAIL_FREE_MSG_FMT "sys_bitarray_free with region size %i and offset %i failed" |
#include <tests/kernel/common/src/bitarray.c>
#define FREE 0U |
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/bitarray.c>
void alloc_and_free_loop | ( | int | divisor | ) |
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/atomic.c>
bool bitarray_bundles_is_zero | ( | sys_bitarray_t * | ba | ) |
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/bitarray.c>
|
inlinestatic |
#include <tests/kernel/common/src/bitarray.c>
|
static |
#include <tests/kernel/common/src/clock.c>
size_t get_bitarray_popcnt | ( | sys_bitarray_t * | ba | ) |
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/clock.c>
|
static |
#include <tests/kernel/common/src/clock.c>
#include <tests/kernel/common/src/atomic.c>
Verify atomic functionalities.
Test Objective:
Test techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints:
#include <tests/kernel/common/src/bitarray.c>
Test bitarrays allocation and free.
#include <tests/kernel/common/src/bitarray.c>
Test defining of bitarrays.
#include <tests/kernel/common/src/bitarray.c>
#include <tests/kernel/common/src/bitarray.c>
Test bitarrays set and clear.
#include <tests/kernel/common/src/bitfield.c>
Test bitfield operations.
#include <tests/kernel/common/src/byteorder.c>
Test sys_mem_swap() functionality.
Test if sys_mem_swap() reverses the contents
#include <tests/kernel/common/src/byteorder.c>
Test swapping for memory contents.
Verify the functionality provided by sys_memcpy_swap()
#include <tests/kernel/common/src/clock.c>
Test clock cycle functionality.
Test Objectve:
Testing techniques
Prerequisite Condition:
Input Specifications:
Expected Test Result:
Pass/Fail criteria:
Test Procedure:
Assumptions and Constraints
TESTPOINT: cycle elapse
TESTPOINT: cycle/uptime cross check
#include <tests/kernel/common/src/clock.c>
Test clock uptime APIs functionality.
TESTPOINT: uptime elapse
TESTPOINT: uptime elapse lower 32-bit
TESTPOINT: uptime straddled ms boundary
TESTPOINT: uptime delta
#include <tests/kernel/fatal/exception/src/main.c>
Test the kernel fatal error handling works correctly.
Manually trigger the crash with various ways and check that the kernel is handling that properly or not. Also the crash reason should match. Check for stack sentinel feature by overflowing the thread's stack and check for the exception.
Manually trigger the crash with various ways and check that the kernel is handling that properly or not. Also the crash reason should match.
#include <tests/kernel/smp/src/main.c>
Test fatal error can be triggered on different core.
When CONFIG_SMP is enabled, on some multiprocessor platforms, exception can be triggered on different core at the same time.
#include <tests/kernel/common/src/bitarray.c>
Test find MSB and LSB operations.
Verify the functions that find out the most significiant bit and least significiant bit work as expected.
#include <tests/kernel/common/src/clock.c>
Test millisecond time duration.
initialize a timer, then providing time duration in millisecond, and check the duration time whether correct.
TESTPOINT: waiting time less than duration and check the count
TESTPOINT: proving duration in millisecond
TESTPOINT: waiting time more than duration and check the count
cleanup environemtn
#include <tests/kernel/common/src/multilib.c>
Test if correct multilib is selected.
#include <tests/kernel/common/src/irq_offload.c>
Test the arch_nop() by invoking and measure it.
This test is mainly for coverage of the code. arch_nop() is a special implementation and it will behave differently on different platforms. By the way, this also measures how many cycles it spends for platforms that support it.
FYI: The potential uses of arch_nop() could be:
Our test here mainly aims at the 4th scenario mentioned above but also potentially tests the 1st scenario. So no optimization here to prevent arch_nop() has optimized by the compiler is necessary.
#include <tests/kernel/common/src/printk.c>
Test printk() functionality.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_be16() functionality.
Test if sys_get_be16() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_be24() functionality.
Test if sys_get_be24() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_be32() functionality.
Test if sys_get_be32() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_be48() functionality.
Test if sys_get_be48() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_be64() functionality.
Test if sys_get_be64() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_le16() functionality.
Test if sys_get_le16() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_le24() functionality.
Test if sys_get_le24() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_le32() functionality.
Test if sys_get_le32() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_le48() functionality.
Test if sys_get_le48() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_get_le64() functionality.
Test if sys_get_le64() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_be16() functionality.
Test if sys_put_be16() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_be24() functionality.
Test if sys_put_be24() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_be32() functionality.
Test if sys_put_be32() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_be48() functionality.
Test if sys_put_be48() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_be64() functionality.
Test if sys_put_be64() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_le16() functionality.
Test if sys_put_le16() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_le24() functionality.
Test if sys_put_le24() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_le32() functionality.
Test if sys_put_le32() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_le48() functionality.
Test if sys_put_le48() correctly handles endianness.
#include <tests/kernel/common/src/byteorder.c>
Test sys_put_le64() functionality.
Test if sys_put_le64() correctly handles endianness.
#include <tests/kernel/common/src/atomic.c>
Verify atomic operation with threads.
Creat two preempt threads with equal priority to atomiclly access the same atomic value. Because these preempt threads are of equal priority, so enable time slice to make them scheduled. The thread will execute for some time. In this time, the two sub threads will be scheduled separately according to the time slice.
#include <tests/kernel/common/src/timeout_order.c>
Test timeout ordering.
Timeouts, when expiring on the same tick, should be handled in the same order they were queued.
#include <tests/kernel/common/src/main.c>
Test sys_kernel_version_get() functionality.
#include <tests/kernel/smp/src/main.c>
Test system workq run on different core.
When macro CONFIG_SMP is enabled, workq can be run on different core.
void validate_bitarray_define | ( | sys_bitarray_t * | ba, |
size_t | num_bits | ||
) |
#include <tests/kernel/common/src/bitarray.c>