From: Liam R. Howlett Date: Thu, 28 Aug 2025 00:30:22 +0000 (-0400) Subject: maple_tree: fix testing for 32 bit builds X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c33db38334a6059252bd444ee5ebb96a3d0d7e4a;p=users%2Fjedix%2Flinux-maple.git maple_tree: fix testing for 32 bit builds Patch series "maple_tree: Fix testing for 32bit compiles". The maple tree test suite supports 32bit builds which causes 32bit nodes and index/last values. Some tests have too large values and must be skipped while others depend on certain actions causing the tree to be altered in another measurable way (such as the height decreasing or increasing). Two tests were added that broke 32bit testing, either by compile warnings or failures. These fixes restore the tests to a working order. Building 32bit version can be done on a 32bit platform, or by using a command like: BUILD=32 make clean maple This patch (of 2): Some tests are invalid on 32bit due to the size of the index and last. Making those tests depend on the correct build flags stops compile complaints. Link: https://lkml.kernel.org/r/20250828003023.418966-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20250828003023.418966-2-Liam.Howlett@oracle.com Fixes: 5d659bbb52a2 ("maple_tree: introduce mas_wr_store_type()") Signed-off-by: Liam R. Howlett Reviewed-by: Sidhartha Kumar Signed-off-by: Andrew Morton --- diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 172700fb7784..90a0db45a33c 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -36428,6 +36428,7 @@ static void check_nomem_writer_race(struct maple_tree *mt) */ static inline int check_vma_modification(struct maple_tree *mt) { +#if defined(CONFIG_64BIT) MA_STATE(mas, mt, 0, 0); mtree_lock(mt); @@ -36451,6 +36452,8 @@ static inline int check_vma_modification(struct maple_tree *mt) mas_destroy(&mas); mtree_unlock(mt); +#endif + return 0; }