aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/multiorder.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-08-28 16:13:16 -0400
committerMatthew Wilcox <willy@infradead.org>2018-10-21 10:46:46 -0400
commitd6427f8179b5dd65eb468c61fc8cc24657c336c9 (patch)
treebe783289bf2c41109ad5386fc62cc7973a0e770e /tools/testing/radix-tree/multiorder.c
parent47e0fab2b15155e33fdff777c791bebfd5855bbc (diff)
xarray: Move multiorder account test in-kernel
Move this test to the in-kernel test suite, and enhance it to test several different orders. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing/radix-tree/multiorder.c')
-rw-r--r--tools/testing/radix-tree/multiorder.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/testing/radix-tree/multiorder.c b/tools/testing/radix-tree/multiorder.c
index 0436554a099a..dc27a3da210a 100644
--- a/tools/testing/radix-tree/multiorder.c
+++ b/tools/testing/radix-tree/multiorder.c
@@ -356,29 +356,6 @@ void multiorder_tagged_iteration(void)
356 item_kill_tree(&tree); 356 item_kill_tree(&tree);
357} 357}
358 358
359static void multiorder_account(void)
360{
361 RADIX_TREE(tree, GFP_KERNEL);
362 struct radix_tree_node *node;
363 void **slot;
364
365 item_insert_order(&tree, 0, 5);
366
367 __radix_tree_insert(&tree, 1 << 5, 5, xa_mk_value(5));
368 __radix_tree_lookup(&tree, 0, &node, NULL);
369 assert(node->count == node->nr_values * 2);
370 radix_tree_delete(&tree, 1 << 5);
371 assert(node->nr_values == 0);
372
373 __radix_tree_insert(&tree, 1 << 5, 5, xa_mk_value(5));
374 __radix_tree_lookup(&tree, 1 << 5, &node, &slot);
375 assert(node->count == node->nr_values * 2);
376 __radix_tree_replace(&tree, node, slot, NULL);
377 assert(node->nr_values == 0);
378
379 item_kill_tree(&tree);
380}
381
382bool stop_iteration = false; 359bool stop_iteration = false;
383 360
384static void *creator_func(void *ptr) 361static void *creator_func(void *ptr)
@@ -457,7 +434,6 @@ void multiorder_checks(void)
457 multiorder_tag_tests(); 434 multiorder_tag_tests();
458 multiorder_iteration(); 435 multiorder_iteration();
459 multiorder_tagged_iteration(); 436 multiorder_tagged_iteration();
460 multiorder_account();
461 multiorder_iteration_race(); 437 multiorder_iteration_race();
462 438
463 radix_tree_cpu_dead(0); 439 radix_tree_cpu_dead(0);