maple_tree: add a test checking storing null
authorWei Yang <richard.weiyang@gmail.com>
Thu, 31 Oct 2024 23:16:27 +0000 (23:16 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Nov 2024 21:09:42 +0000 (13:09 -0800)
commit431e10601913f8f2006f3ed607e73eedf264b426
tree1aafa7eeadfbe6fc6f52150354823de6a667c1ca
parent0ea120b278ad7f7cfeeb606e150ad04b192df60b
maple_tree: add a test checking storing null

Add a test to assert that, when storing null to am empty tree or a
single entry tree it will not result into:

  * a root node with range [0, ULONG_MAX] set to NULL
  * a root node with consecutive slot set to NULL

[akpm@linux-foundation.org: work around build error (mas_root)]
Link: https://lkml.kernel.org/r/20241031231627.14316-6-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/test_maple_tree.c