From 91f4c46b4862db74d036e4baf1df08d991d75045 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Fri, 28 Aug 2020 12:01:55 -0400 Subject: [PATCH] maple_tree_test: Add verification of 1000 entry tree node count with rev alloc (top-down) Signed-off-by: Liam R. Howlett --- lib/test_maple_tree.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index b98893134b40..cb1815287798 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -32095,7 +32095,6 @@ static void check_dfs_preorder(struct maple_tree *mt) MA_STATE(mas, mt, 0, 0); check_seq(mt, 1000, false); - do { count++; mas_dfs_preorder(&mas); @@ -32114,6 +32113,18 @@ static void check_dfs_preorder(struct maple_tree *mt) } while(!mas_is_none(&mas)); // 71 + MAS_START = 72 MT_BUG_ON(mt, count != 72); + mtree_destroy(mt); + + mtree_init(mt, MAPLE_ALLOC_RANGE); + mas_reset(&mas); + count = 0; + check_rev_seq(mt, 1000, false); + do { + count++; + mas_dfs_preorder(&mas); + } while(!mas_is_none(&mas)); + // 71 + MAS_START = 72 + MT_BUG_ON(mt, count != 72); } static void check_dup_tree(struct maple_tree *oldmt) -- 2.50.1