aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree
AgeCommit message (Collapse)AuthorFilesLines
2016-03-17radix-tree tests: add test for radix_tree_iter_nextKonstantin Khlebnikov1-8/+39
Without fix test crashes inside tagged iteration. Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-03-17radix-tree tests: add regression3 testKonstantin Khlebnikov5-1/+90
After calling radix_tree_iter_retry(), 'slot' will be set to NULL. This can cause radix_tree_next_slot() to dereference the NULL pointer. Add Konstantin Khlebnikov's test to the regression framework. Signed-off-by: Matthew Wilcox <[email protected]> Reported-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-03-17radix_tree: tag all internal tree nodes as indirect pointersMatthew Wilcox1-2/+3
Set the 'indirect_ptr' bit on all the pointers to internal nodes, not just on the root node. This enables the following patches to support multi-order entries in the radix tree. This patch is split out for ease of bisection. Signed-off-by: Matthew Wilcox <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-03-17radix tree test harnessMatthew Wilcox36-0/+2110
This code is mostly from Andrew Morton and Nick Piggin; tarball downloaded from http://ozlabs.org/~akpm/rtth.tar.gz with sha1sum 0ce679db9ec047296b5d1ff7a1dfaa03a7bef1bd Some small modifications were necessary to the test harness to fix the build with the current Linux source code. I also made minor modifications to automatically test the radix-tree.c and radix-tree.h files that are in the current source tree, as opposed to a copied and slightly modified version. I am sure more could be done to tidy up the harness, as well as adding more tests. [[email protected]: fix compilation] Signed-off-by: Matthew Wilcox <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>