• Home
  • Raw
  • Download

Lines Matching full:i

35 	unsigned long i;  in idr_alloc_test()  local
43 for (i = 0x3ffe; i < 0x4003; i++) { in idr_alloc_test()
47 if (i < 0x4000) in idr_alloc_test()
48 item = item_create(i, 0); in idr_alloc_test()
50 item = item_create(i - 0x3fff, 0); in idr_alloc_test()
78 int i; in idr_null_test() local
93 for (i = 0; i < 10; i++) { in idr_null_test()
94 assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == i); in idr_null_test()
105 for (i = 0; i < 9; i++) { in idr_null_test()
106 idr_remove(&idr, i); in idr_null_test()
122 for (i = 1; i < 10; i++) { in idr_null_test()
123 assert(idr_alloc(&idr, NULL, 1, 0, GFP_KERNEL) == i); in idr_null_test()
132 unsigned int i; in idr_nowait_test() local
137 for (i = 0; i < 3; i++) { in idr_nowait_test()
138 struct item *item = item_create(i, 0); in idr_nowait_test()
139 assert(idr_alloc(&idr, item, i, i + 1, GFP_NOWAIT) == i); in idr_nowait_test()
150 unsigned long i; in idr_get_next_test() local
157 for(i = 0; indices[i]; i++) { in idr_get_next_test()
158 struct item *item = item_create(indices[i], 0); in idr_get_next_test()
159 assert(idr_alloc(&idr, item, indices[i], indices[i+1], in idr_get_next_test()
160 GFP_KERNEL) == indices[i]); in idr_get_next_test()
163 for(i = 0, nextid = 0; indices[i]; i++) { in idr_get_next_test()
165 assert(nextid == indices[i]); in idr_get_next_test()
225 int i, id; in idr_align_test() local
228 for (i = 0; i < 9; i++) { in idr_align_test()
229 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != i); in idr_align_test()
234 for (i = 1; i < 10; i++) { in idr_align_test()
235 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != i - 1); in idr_align_test()
240 for (i = 2; i < 11; i++) { in idr_align_test()
241 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != i - 2); in idr_align_test()
246 for (i = 3; i < 12; i++) { in idr_align_test()
247 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != i - 3); in idr_align_test()
252 for (i = 0; i < 8; i++) { in idr_align_test()
253 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != 0); in idr_align_test()
254 BUG_ON(idr_alloc(idr, &name[i + 1], 0, 0, GFP_KERNEL) != 1); in idr_align_test()
262 for (i = 0; i < 8; i++) { in idr_align_test()
265 idr_replace(idr, &name[i], 0); in idr_align_test()
267 BUG_ON(idr_find(idr, 0) != &name[i]); in idr_align_test()
271 for (i = 0; i < 8; i++) { in idr_align_test()
272 BUG_ON(idr_alloc(idr, &name[i], 0, 0, GFP_KERNEL) != 0); in idr_align_test()
276 idr_replace(idr, &name[i + 1], 0); in idr_align_test()
333 unsigned long i; in idr_checks() local
336 for (i = 0; i < 10000; i++) { in idr_checks()
337 struct item *item = item_create(i, 0); in idr_checks()
338 assert(idr_alloc(&idr, item, 0, 20000, GFP_KERNEL) == i); in idr_checks()
343 for (i = 0; i < 5000; i++) in idr_checks()
344 item_idr_remove(&idr, i); in idr_checks()
358 for (i = 1; i < RADIX_TREE_MAP_SIZE; i++) in idr_checks()
359 assert(idr_alloc(&idr, DUMMY_PTR, 0, 0, GFP_KERNEL) == i); in idr_checks()
363 for (i = INT_MAX - 3UL; i < INT_MAX + 1UL; i++) { in idr_checks()
364 struct item *item = item_create(i, 0); in idr_checks()
365 assert(idr_alloc(&idr, item, i, i + 10, GFP_KERNEL) == i); in idr_checks()
367 assert(idr_alloc(&idr, DUMMY_PTR, i - 2, i, GFP_KERNEL) == -ENOSPC); in idr_checks()
368 assert(idr_alloc(&idr, DUMMY_PTR, i - 2, i + 10, GFP_KERNEL) == -ENOSPC); in idr_checks()
377 for (i = INT_MAX - 3UL; i < INT_MAX + 3UL; i++) { in idr_checks()
380 if (i <= INT_MAX) in idr_checks()
381 item = item_create(i, 0); in idr_checks()
383 item = item_create(i - INT_MAX - 1, 0); in idr_checks()
393 for (i = 1; i < 10000; i++) { in idr_checks()
394 struct item *item = item_create(i, 0); in idr_checks()
395 assert(idr_alloc(&idr, item, 1, 20000, GFP_KERNEL) == i); in idr_checks()
448 unsigned long i; in ida_check_conv_user() local
450 for (i = 0; i < 1000000; i++) { in ida_check_conv_user()
453 IDA_BUG_ON(&ida, ((i % IDA_BITMAP_BITS) != in ida_check_conv_user()
455 ((i % IDA_BITMAP_BITS) != 0)); in ida_check_conv_user()
458 IDA_BUG_ON(&ida, (i % IDA_BITMAP_BITS) == in ida_check_conv_user()
461 IDA_BUG_ON(&ida, id != i); in ida_check_conv_user()
470 unsigned int i; in ida_check_random() local
475 for (i = 0; i < 100000; i++) { in ida_check_random()
476 int i = rand(); in ida_check_random() local
477 int bit = i & 2047; in ida_check_random()
495 unsigned long i; in ida_simple_get_remove_test() local
497 for (i = 0; i < 10000; i++) { in ida_simple_get_remove_test()
498 assert(ida_simple_get(&ida, 0, 20000, GFP_KERNEL) == i); in ida_simple_get_remove_test()
502 for (i = 0; i < 10000; i++) { in ida_simple_get_remove_test()
503 ida_simple_remove(&ida, i); in ida_simple_get_remove_test()
534 int i, ret; in ida_leak_fn() local
538 do for (i = 0; i < 1000; i++) { in ida_leak_fn()
552 int i; in ida_thread_tests() local
554 for (i = 0; i < ARRAY_SIZE(threads); i++) in ida_thread_tests()
555 if (pthread_create(&threads[i], NULL, ida_random_fn, NULL)) { in ida_thread_tests()
560 while (i--) in ida_thread_tests()
561 pthread_join(threads[i], NULL); in ida_thread_tests()
563 for (i = 0; i < ARRAY_SIZE(threads); i++) in ida_thread_tests()
564 if (pthread_create(&threads[i], NULL, ida_leak_fn, &ida)) { in ida_thread_tests()
569 while (i--) in ida_thread_tests()
570 pthread_join(threads[i], NULL); in ida_thread_tests()