This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
c351492bc7
zephyr
/
tests
/
lib
/
rbtree
/
testcase.yaml
5 lines
94 B
YAML
Raw
Normal View
History
Unescape
Escape
tests: rbtree test Test for the rbtree balanced tree. The theory here is that the test uses a PRNG to randomly build and modify trees build from an array of node objects (whose comparison operator is just their memory address). It begins with tiny node sets, so as to catch edge cases (e.g. nodes being the root, or a leaf, or parent/child) in the balancing algorithm before increasing the size and continuing. At each iteration the resulting tree is walked, verifying that it contains exactly the nodes that we expect it should, that they appear in the correct sorted order in the walk, that their local structure matches a correct binary tree, and that the red/black rules are followed always: * The root must be black * Red nodes can have only black children * The path from the root to any NULL child pointer in the tree must cross the same number of black nodes. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-03-22 04:46:34 +08:00
tests
:
tests: kernel: style, tag, and category fixes Fix coding style, test tags and use categories. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-22 05:52:43 +08:00
libraries.data_structures.rbtree
:
tags
:
rbtree
lib/os: Conditionally eliminate alloca/VLA usage MISRA rules (see #9892) forbid alloca() and family, even though those features can be valuable performance and memory size optimizations useful to Zephyr. Introduce a MISRA_SANE kconfig, which when true enables a gcc error condition whenever a variable length array is used. When enabled, the mempool code will use a theoretical-maximum array size on the stack instead of one tailored to the current pool configuration. The rbtree code will do similarly, but because the theoretical maximum is quite a bit larger (236 bytes on 32 bit platforms) the array is placed into struct rbtree instead so it can live in static data (and also so I don't have to go and retune all the test stack sizes!). Current code only uses at most two of these (one in the scheduler when SCHED_SCALABLE is selected, and one for dynamic kernel objects when USERSPACE and DYNAMIC_OBJECTS are set). This tunable is false by default, but is selected in a single test (a subcase of tests/kernel/common) for coverage. Note that the I2C and SPI subsystems contain uncorrected VLAs, so a few platforms need to be blacklisted with a filter. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-02-28 03:53:18 +08:00
filter
:
not CONFIG_MISRA_SANE