]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree_test: Add verification of 1000 entry tree node count with rev alloc (top...
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 28 Aug 2020 16:01:55 +0000 (12:01 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:09:26 +0000 (15:09 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/test_maple_tree.c

index b98893134b40826d7211c9793d62788cecdcfc75..cb1815287798e59e0e15737371d96c91d48446ca 100644 (file)
@@ -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)