1. Add a tag in the testcase.yaml to deal with the following error from
sanitycheck:
E: tests/lib/rbtree/testcase.yaml: can't load (skipping):
<NotMappingError: error code 6: Value: None is not of a
mapping type: Path: '/'>
2. Reduced the MAX_NODES so the test will build on small memory systems
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
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>