diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-06-18 23:23:37 +0200 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-08-22 05:54:20 +0200 |
commit | 0a3856392cff1542170b5bc37211c9a21fd0c3f6 (patch) | |
tree | 90504985f74c89f359565305cc0c49ae88215d2f /tools/testing | |
parent | idr-test: Convert ida_check_nomem to new API (diff) | |
download | linux-0a3856392cff1542170b5bc37211c9a21fd0c3f6.tar.xz linux-0a3856392cff1542170b5bc37211c9a21fd0c3f6.zip |
test_ida: Move ida_check_leaf
Convert to new API and move to kernel space. Take the opportunity to
test the situation a little more thoroughly (ie at different offsets).
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/radix-tree/idr-test.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c index 0f557784327d..fef1f45b927b 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -337,32 +337,6 @@ void ida_check_nomem(void) } /* - * Check what happens when we fill a leaf and then delete it. This may - * discover mishandling of IDR_FREE. - */ -void ida_check_leaf(void) -{ - DEFINE_IDA(ida); - int id; - unsigned long i; - - for (i = 0; i < IDA_BITMAP_BITS; i++) { - assert(ida_pre_get(&ida, GFP_KERNEL)); - assert(!ida_get_new(&ida, &id)); - assert(id == i); - } - - ida_destroy(&ida); - assert(ida_is_empty(&ida)); - - assert(ida_pre_get(&ida, GFP_KERNEL)); - assert(!ida_get_new(&ida, &id)); - assert(id == 0); - ida_destroy(&ida); - assert(ida_is_empty(&ida)); -} - -/* * Check handling of conversions between exceptional entries and full bitmaps. */ void ida_check_conv(void) @@ -560,7 +534,6 @@ void user_ida_checks(void) ida_destroy(&ida); assert(ida_is_empty(&ida)); - ida_check_leaf(); ida_check_max(); ida_check_conv(); ida_check_random(); |