From: Peng Zhang <zhangpeng...@bytedance.com> commit f670fa1caadb4ea532a89012c5451e4c6789bfcc upstream.
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...@bytedance.com Signed-off-by: Peng Zhang <zhangpeng...@bytedance.com> Reviewed-by: Liam R. Howlett <liam.howl...@oracle.com> Cc: Christian Brauner <brau...@kernel.org> Cc: Jonathan Corbet <cor...@lwn.net> Cc: Mateusz Guzik <mjgu...@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> Cc: Matthew Wilcox <wi...@infradead.org> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Mike Christie <michael.chris...@oracle.com> Cc: Nicholas Piggin <npig...@gmail.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Suren Baghdasaryan <sur...@google.com> Signed-off-by: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Yu Kuai <yuku...@huawei.com> --- lib/test_maple_tree.c | 8 ++++---- tools/testing/radix-tree/maple.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index 464eeb90d5ad..de470950714f 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -3585,10 +3585,6 @@ static int __init maple_tree_seed(void) pr_info("\nTEST STARTING\n\n"); - mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); - check_root_expand(&tree); - mtree_destroy(&tree); - #if defined(BENCH_SLOT_STORE) #define BENCH mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); @@ -3646,6 +3642,10 @@ static int __init maple_tree_seed(void) goto skip; #endif + mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); + check_root_expand(&tree); + mtree_destroy(&tree); + mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); check_iteration(&tree); mtree_destroy(&tree); diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 76a8990bb14e..576b825d6bb1 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -35938,7 +35938,9 @@ void farmer_tests(void) void maple_tree_tests(void) { +#if !defined(BENCH) farmer_tests(); +#endif maple_tree_seed(); maple_tree_harvest(); } -- 2.39.2