Skip to content

Commit f670fa1

Browse files
Peng Zhangakpm00
authored andcommitted
maple_tree: skip other tests when BENCH is enabled
Skip other tests when BENCH is enabled so that performance can be measured in user space. Link: https://lkml.kernel.org/r/20231027033845.90608-8-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Mike Christie <michael.christie@oracle.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 9bc1d3c commit f670fa1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/test_maple_tree.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3585,10 +3585,6 @@ static int __init maple_tree_seed(void)
35853585

35863586
pr_info("\nTEST STARTING\n\n");
35873587

3588-
mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE);
3589-
check_root_expand(&tree);
3590-
mtree_destroy(&tree);
3591-
35923588
#if defined(BENCH_SLOT_STORE)
35933589
#define BENCH
35943590
mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE);
@@ -3646,6 +3642,10 @@ static int __init maple_tree_seed(void)
36463642
goto skip;
36473643
#endif
36483644

3645+
mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE);
3646+
check_root_expand(&tree);
3647+
mtree_destroy(&tree);
3648+
36493649
mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE);
36503650
check_iteration(&tree);
36513651
mtree_destroy(&tree);

tools/testing/radix-tree/maple.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36299,7 +36299,9 @@ void farmer_tests(void)
3629936299

3630036300
void maple_tree_tests(void)
3630136301
{
36302+
#if !defined(BENCH)
3630236303
farmer_tests();
36304+
#endif
3630336305
maple_tree_seed();
3630436306
maple_tree_harvest();
3630536307
}

0 commit comments

Comments
 (0)