diff options
author | Matthew Wilcox <willy@linux.intel.com> | 2016-05-21 02:02:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 02:58:30 +0200 |
commit | 4f3755d1ae3cd856a5c7da3dea12cced8dc51fbf (patch) | |
tree | 867f3d6373bfb42bd81de93bdb76285d7a07b3df /tools/testing/radix-tree/test.h | |
parent | radix-tree: fix extending the tree for multi-order entries at offset 0 (diff) | |
download | linux-4f3755d1ae3cd856a5c7da3dea12cced8dc51fbf.tar.xz linux-4f3755d1ae3cd856a5c7da3dea12cced8dc51fbf.zip |
radix tree test suite: start adding multiorder tests
Test suite infrastructure for working with multiorder entries.
The test itself is pretty basic: Add an entry, check that all expected
indices return that entry and that indices around that entry don't
return an entry. Then delete the entry and check no index returns that
entry. Tests a few edge conditions including the multiorder entry at
index 0 and at a higher index. Also tests deleting through an alias as
well as through the canonical index.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Jan Kara <jack@suse.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/radix-tree/test.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/testing/radix-tree/test.h b/tools/testing/radix-tree/test.h index 4e1d95faaa94..53cb595db44a 100644 --- a/tools/testing/radix-tree/test.h +++ b/tools/testing/radix-tree/test.h @@ -8,8 +8,11 @@ struct item { }; struct item *item_create(unsigned long index); -int __item_insert(struct radix_tree_root *root, struct item *item); +int __item_insert(struct radix_tree_root *root, struct item *item, + unsigned order); int item_insert(struct radix_tree_root *root, unsigned long index); +int item_insert_order(struct radix_tree_root *root, unsigned long index, + unsigned order); int item_delete(struct radix_tree_root *root, unsigned long index); struct item *item_lookup(struct radix_tree_root *root, unsigned long index); @@ -23,6 +26,7 @@ void item_full_scan(struct radix_tree_root *root, unsigned long start, void item_kill_tree(struct radix_tree_root *root); void tag_check(void); +void multiorder_checks(void); struct item * item_tag_set(struct radix_tree_root *root, unsigned long index, int tag); |