opnsense-src/tests/sys/sys
Doug Moore 2c545cf3b0 rb_tree: test rank balance
With _RB_DIAGNOSTIC defined, provide an RB_RANK method to compute the
rank of a node in an rb-tree, if the subtree rooted at that node is
rank-balanced, and -1 otherwise.

In rb_test, rewrite a bit to avoid malloc/free and nondeterministic
running times because of randomness. Allocate all the nodes on the
stack, and shuffle a set of keys to get randomness for the testing.

Add a rank-balance check for the completed tree.

Reviewed by:	markj
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36484
2022-09-07 21:40:05 -05:00
..
arb_test.c tests/sys/sys: Raise WARNS 2021-09-24 11:31:53 -04:00
bitset_test.c sys/bitset.h: reduce visibility of BIT_* macros 2021-12-05 23:00:25 +01:00
bitstring_test.c bitstring_test: Add regression tests for bit_ff(c|s)_area_at() 2022-05-20 10:36:05 -04:00
Makefile Fix overflow errors in sbttous and sbttoms 2022-05-09 16:38:59 -06:00
Makefile.depend
qmath_test.c
rb_test.c rb_tree: test rank balance 2022-09-07 21:40:05 -05:00
splay_test.c tests/sys/sys: Raise WARNS 2021-09-24 11:31:53 -04:00
time_test.c Fix overflow errors in sbttous and sbttoms 2022-05-09 16:38:59 -06:00