lkml.org 
[lkml]   [2022]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH Fix 2/2] test_maple_tree: Add test for spanning store to most of the tree
Date
Test spanning almost the entire tree to detect if the root is dead and
the node is placed in the wrong location.

Fixes: 1d3ae73e4e86 (test_maple_tree: Add test for spanning store to most of the tree)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
lib/test_maple_tree.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c
index 8de5705b7b9b..b028f5648857 100644
--- a/lib/test_maple_tree.c
+++ b/lib/test_maple_tree.c
@@ -35685,7 +35685,6 @@ static noinline void check_spanning_write(struct maple_tree *mt)
mas_set(&mas, 1205);
MT_BUG_ON(mt, mas_walk(&mas) != NULL);
mtree_unlock(mt);
- mt_dump(mt);
mt_validate(mt);
mtree_destroy(mt);

@@ -35817,6 +35816,15 @@ static noinline void check_spanning_write(struct maple_tree *mt)
MT_BUG_ON(mt, mas_walk(&mas) != NULL);
mtree_unlock(mt);
mtree_destroy(mt);
+
+ mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE);
+ for (i = 0; i <= 100; i++)
+ mtree_test_store_range(mt, i * 10, i * 10 + 5, &i);
+
+ mtree_lock(mt);
+ mas_set_range(&mas, 76, 875);
+ mas_store_gfp(&mas, NULL, GFP_KERNEL);
+ mtree_unlock(mt);
}

static noinline void check_null_expand(struct maple_tree *mt)
--
2.35.1
\
 
 \ /
  Last update: 2022-06-29 17:25    [W:0.876 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site