]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: fix testing for 32 bit builds
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 28 Aug 2025 00:30:22 +0000 (20:30 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:26 +0000 (17:25 -0700)
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 <Liam.Howlett@Oracle.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/radix-tree/maple.c

index 172700fb7784d29f9403003b4484a5ebd7aa316b..90a0db45a33c388cfcbf665483ad87ff381c0ae7 100644 (file)
@@ -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;
 }