radix tree test suite: add tests for radix_tree_locate_item()

Fairly simple tests; add various items to the tree, then make sure we
can find them again.  Also check that a pointer that we know isn't in
the tree is not found.

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>
This commit is contained in:
Matthew Wilcox 2016-05-20 17:01:39 -07:00 committed by Linus Torvalds
parent f518b1607e
commit d42cb1a9ff
2 changed files with 44 additions and 0 deletions

View file

@ -9,6 +9,9 @@
#include "../../include/linux/compiler.h"
#define CONFIG_SHMEM
#define CONFIG_SWAP
#ifndef NULL
#define NULL 0
#endif