[PATCH] idr-test: ida_simple_get/remove are deprecated, so switch to ida_alloc/free.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: zhangheng <zhangheng@xxxxxxxxxx>
---
 tools/testing/radix-tree/idr-test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c
index 84b8c3c92c79..7fb04a830a21 100644
--- a/tools/testing/radix-tree/idr-test.c
+++ b/tools/testing/radix-tree/idr-test.c
@@ -505,12 +505,12 @@ void ida_simple_get_remove_test(void)
 	unsigned long i;
 
 	for (i = 0; i < 10000; i++) {
-		assert(ida_simple_get(&ida, 0, 20000, GFP_KERNEL) == i);
+		assert(ida_alloc_range(&ida, 0, 19999, GFP_KERNEL) == i);
 	}
-	assert(ida_simple_get(&ida, 5, 30, GFP_KERNEL) < 0);
+	assert(ida_alloc_range(&ida, 5, 29, GFP_KERNEL) < 0);
 
 	for (i = 0; i < 10000; i++) {
-		ida_simple_remove(&ida, i);
+		ida_free(&ida, i);
 	}
 	assert(ida_is_empty(&ida));
 
-- 
2.45.2





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux