Lines Matching refs:test

18 static void list_test_list_init(struct kunit *test)  in list_test_list_init()  argument
37 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list1)); in list_test_list_init()
38 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_init()
39 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list3)); in list_test_list_init()
40 KUNIT_EXPECT_TRUE(test, list_empty_careful(list4)); in list_test_list_init()
41 KUNIT_EXPECT_TRUE(test, list_empty_careful(list5)); in list_test_list_init()
47 static void list_test_list_add(struct kunit *test) in list_test_list_add() argument
56 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_add()
57 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_add()
58 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_add()
61 static void list_test_list_add_tail(struct kunit *test) in list_test_list_add_tail() argument
70 KUNIT_EXPECT_PTR_EQ(test, list.next, &a); in list_test_list_add_tail()
71 KUNIT_EXPECT_PTR_EQ(test, a.prev, &list); in list_test_list_add_tail()
72 KUNIT_EXPECT_PTR_EQ(test, a.next, &b); in list_test_list_add_tail()
75 static void list_test_list_del(struct kunit *test) in list_test_list_del() argument
87 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_del()
88 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_del()
91 static void list_test_list_replace(struct kunit *test) in list_test_list_replace() argument
103 KUNIT_EXPECT_PTR_EQ(test, list.next, &a_new); in list_test_list_replace()
104 KUNIT_EXPECT_PTR_EQ(test, b.prev, &a_new); in list_test_list_replace()
107 static void list_test_list_replace_init(struct kunit *test) in list_test_list_replace_init() argument
119 KUNIT_EXPECT_PTR_EQ(test, list.next, &a_new); in list_test_list_replace_init()
120 KUNIT_EXPECT_PTR_EQ(test, b.prev, &a_new); in list_test_list_replace_init()
123 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a_old)); in list_test_list_replace_init()
126 static void list_test_list_swap(struct kunit *test) in list_test_list_swap() argument
138 KUNIT_EXPECT_PTR_EQ(test, &b, list.next); in list_test_list_swap()
139 KUNIT_EXPECT_PTR_EQ(test, &a, list.prev); in list_test_list_swap()
141 KUNIT_EXPECT_PTR_EQ(test, &a, b.next); in list_test_list_swap()
142 KUNIT_EXPECT_PTR_EQ(test, &list, b.prev); in list_test_list_swap()
144 KUNIT_EXPECT_PTR_EQ(test, &list, a.next); in list_test_list_swap()
145 KUNIT_EXPECT_PTR_EQ(test, &b, a.prev); in list_test_list_swap()
148 static void list_test_list_del_init(struct kunit *test) in list_test_list_del_init() argument
160 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_del_init()
161 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_del_init()
162 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a)); in list_test_list_del_init()
165 static void list_test_list_del_init_careful(struct kunit *test) in list_test_list_del_init_careful() argument
180 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_del_init_careful()
181 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_del_init_careful()
182 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a)); in list_test_list_del_init_careful()
185 static void list_test_list_move(struct kunit *test) in list_test_list_move() argument
198 KUNIT_EXPECT_TRUE(test, list_empty(&list1)); in list_test_list_move()
200 KUNIT_EXPECT_PTR_EQ(test, &a, list2.next); in list_test_list_move()
201 KUNIT_EXPECT_PTR_EQ(test, &b, a.next); in list_test_list_move()
204 static void list_test_list_move_tail(struct kunit *test) in list_test_list_move_tail() argument
217 KUNIT_EXPECT_TRUE(test, list_empty(&list1)); in list_test_list_move_tail()
219 KUNIT_EXPECT_PTR_EQ(test, &b, list2.next); in list_test_list_move_tail()
220 KUNIT_EXPECT_PTR_EQ(test, &a, b.next); in list_test_list_move_tail()
223 static void list_test_list_bulk_move_tail(struct kunit *test) in list_test_list_bulk_move_tail() argument
246 KUNIT_EXPECT_PTR_EQ(test, ptr, list1_values[i]); in list_test_list_bulk_move_tail()
249 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_bulk_move_tail()
252 KUNIT_EXPECT_PTR_EQ(test, ptr, list2_values[i]); in list_test_list_bulk_move_tail()
255 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_bulk_move_tail()
258 static void list_test_list_is_head(struct kunit *test) in list_test_list_is_head() argument
267 KUNIT_EXPECT_TRUE_MSG(test, list_is_head(&a, &a), in list_test_list_is_head()
269 KUNIT_EXPECT_FALSE_MSG(test, list_is_head(&a, &b), in list_test_list_is_head()
271 KUNIT_EXPECT_FALSE_MSG(test, list_is_head(&a, &c), in list_test_list_is_head()
276 static void list_test_list_is_first(struct kunit *test) in list_test_list_is_first() argument
284 KUNIT_EXPECT_TRUE(test, list_is_first(&a, &list)); in list_test_list_is_first()
285 KUNIT_EXPECT_FALSE(test, list_is_first(&b, &list)); in list_test_list_is_first()
288 static void list_test_list_is_last(struct kunit *test) in list_test_list_is_last() argument
296 KUNIT_EXPECT_FALSE(test, list_is_last(&a, &list)); in list_test_list_is_last()
297 KUNIT_EXPECT_TRUE(test, list_is_last(&b, &list)); in list_test_list_is_last()
300 static void list_test_list_empty(struct kunit *test) in list_test_list_empty() argument
308 KUNIT_EXPECT_FALSE(test, list_empty(&list1)); in list_test_list_empty()
309 KUNIT_EXPECT_TRUE(test, list_empty(&list2)); in list_test_list_empty()
312 static void list_test_list_empty_careful(struct kunit *test) in list_test_list_empty_careful() argument
321 KUNIT_EXPECT_FALSE(test, list_empty_careful(&list1)); in list_test_list_empty_careful()
322 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_empty_careful()
325 static void list_test_list_rotate_left(struct kunit *test) in list_test_list_rotate_left() argument
337 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_rotate_left()
338 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_rotate_left()
339 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_rotate_left()
342 static void list_test_list_rotate_to_front(struct kunit *test) in list_test_list_rotate_to_front() argument
360 KUNIT_EXPECT_PTR_EQ(test, ptr, list_values[i]); in list_test_list_rotate_to_front()
363 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_rotate_to_front()
366 static void list_test_list_is_singular(struct kunit *test) in list_test_list_is_singular() argument
372 KUNIT_EXPECT_FALSE(test, list_is_singular(&list)); in list_test_list_is_singular()
377 KUNIT_EXPECT_TRUE(test, list_is_singular(&list)); in list_test_list_is_singular()
382 KUNIT_EXPECT_FALSE(test, list_is_singular(&list)); in list_test_list_is_singular()
385 static void list_test_list_cut_position(struct kunit *test) in list_test_list_cut_position() argument
401 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_position()
405 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_cut_position()
408 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_position()
413 static void list_test_list_cut_before(struct kunit *test) in list_test_list_cut_before() argument
429 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_before()
433 KUNIT_EXPECT_EQ(test, i, 1); in list_test_list_cut_before()
436 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_before()
441 static void list_test_list_splice(struct kunit *test) in list_test_list_splice() argument
459 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice()
463 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice()
466 static void list_test_list_splice_tail(struct kunit *test) in list_test_list_splice_tail() argument
484 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_tail()
488 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail()
491 static void list_test_list_splice_init(struct kunit *test) in list_test_list_splice_init() argument
509 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_init()
513 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_init()
515 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_splice_init()
518 static void list_test_list_splice_tail_init(struct kunit *test) in list_test_list_splice_tail_init() argument
536 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_tail_init()
540 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail_init()
542 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_splice_tail_init()
545 static void list_test_list_entry(struct kunit *test) in list_test_list_entry() argument
549 KUNIT_EXPECT_PTR_EQ(test, &test_struct, list_entry(&(test_struct.list), in list_test_list_entry()
553 static void list_test_list_entry_is_head(struct kunit *test) in list_test_list_entry_is_head() argument
562 KUNIT_EXPECT_TRUE_MSG(test, in list_test_list_entry_is_head()
565 KUNIT_EXPECT_FALSE_MSG(test, in list_test_list_entry_is_head()
568 KUNIT_EXPECT_FALSE_MSG(test, in list_test_list_entry_is_head()
573 static void list_test_list_first_entry(struct kunit *test) in list_test_list_first_entry() argument
582 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, list_first_entry(&list, in list_test_list_first_entry()
586 static void list_test_list_last_entry(struct kunit *test) in list_test_list_last_entry() argument
595 KUNIT_EXPECT_PTR_EQ(test, &test_struct2, list_last_entry(&list, in list_test_list_last_entry()
599 static void list_test_list_first_entry_or_null(struct kunit *test) in list_test_list_first_entry_or_null() argument
604 KUNIT_EXPECT_FALSE(test, list_first_entry_or_null(&list, in list_test_list_first_entry_or_null()
610 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, in list_test_list_first_entry_or_null()
615 static void list_test_list_next_entry(struct kunit *test) in list_test_list_next_entry() argument
624 KUNIT_EXPECT_PTR_EQ(test, &test_struct2, list_next_entry(&test_struct1, in list_test_list_next_entry()
628 static void list_test_list_prev_entry(struct kunit *test) in list_test_list_prev_entry() argument
637 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, list_prev_entry(&test_struct2, in list_test_list_prev_entry()
641 static void list_test_list_for_each(struct kunit *test) in list_test_list_for_each() argument
652 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each()
656 KUNIT_EXPECT_EQ(test, i, 3); in list_test_list_for_each()
659 static void list_test_list_for_each_prev(struct kunit *test) in list_test_list_for_each_prev() argument
670 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_prev()
674 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev()
677 static void list_test_list_for_each_safe(struct kunit *test) in list_test_list_for_each_safe() argument
689 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_safe()
694 KUNIT_EXPECT_EQ(test, i, 3); in list_test_list_for_each_safe()
695 KUNIT_EXPECT_TRUE(test, list_empty(&list)); in list_test_list_for_each_safe()
698 static void list_test_list_for_each_prev_safe(struct kunit *test) in list_test_list_for_each_prev_safe() argument
709 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_prev_safe()
714 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev_safe()
715 KUNIT_EXPECT_TRUE(test, list_empty(&list)); in list_test_list_for_each_prev_safe()
718 static void list_test_list_for_each_entry(struct kunit *test) in list_test_list_for_each_entry() argument
732 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry()
736 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_for_each_entry()
739 static void list_test_list_for_each_entry_reverse(struct kunit *test) in list_test_list_for_each_entry_reverse() argument
753 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry_reverse()
757 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_entry_reverse()
813 static void hlist_test_init(struct kunit *test) in hlist_test_init() argument
831 KUNIT_EXPECT_TRUE(test, hlist_empty(&list1)); in hlist_test_init()
832 KUNIT_EXPECT_TRUE(test, hlist_empty(&list2)); in hlist_test_init()
833 KUNIT_EXPECT_TRUE(test, hlist_empty(&list3)); in hlist_test_init()
834 KUNIT_EXPECT_TRUE(test, hlist_empty(list4)); in hlist_test_init()
835 KUNIT_EXPECT_TRUE(test, hlist_empty(list5)); in hlist_test_init()
841 static void hlist_test_unhashed(struct kunit *test) in hlist_test_unhashed() argument
849 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
854 KUNIT_EXPECT_FALSE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
859 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
863 static void hlist_test_unhashed_lockless(struct kunit *test) in hlist_test_unhashed_lockless() argument
871 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
876 KUNIT_EXPECT_FALSE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
881 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
884 static void hlist_test_del(struct kunit *test) in hlist_test_del() argument
896 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_del()
897 KUNIT_EXPECT_PTR_EQ(test, b.pprev, &list.first); in hlist_test_del()
900 static void hlist_test_del_init(struct kunit *test) in hlist_test_del_init() argument
912 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_del_init()
913 KUNIT_EXPECT_PTR_EQ(test, b.pprev, &list.first); in hlist_test_del_init()
916 KUNIT_EXPECT_PTR_EQ(test, a.next, NULL); in hlist_test_del_init()
917 KUNIT_EXPECT_PTR_EQ(test, a.pprev, NULL); in hlist_test_del_init()
921 static void hlist_test_add(struct kunit *test) in hlist_test_add() argument
932 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_add()
934 KUNIT_EXPECT_PTR_EQ(test, c.pprev, &(b.next)); in hlist_test_add()
935 KUNIT_EXPECT_PTR_EQ(test, b.next, &c); in hlist_test_add()
937 KUNIT_EXPECT_PTR_EQ(test, a.pprev, &(c.next)); in hlist_test_add()
938 KUNIT_EXPECT_PTR_EQ(test, c.next, &a); in hlist_test_add()
940 KUNIT_EXPECT_PTR_EQ(test, d.pprev, &(a.next)); in hlist_test_add()
941 KUNIT_EXPECT_PTR_EQ(test, a.next, &d); in hlist_test_add()
945 static void hlist_test_fake(struct kunit *test) in hlist_test_fake() argument
952 KUNIT_EXPECT_FALSE(test, hlist_fake(&a)); in hlist_test_fake()
957 KUNIT_EXPECT_TRUE(test, hlist_fake(&a)); in hlist_test_fake()
960 static void hlist_test_is_singular_node(struct kunit *test) in hlist_test_is_singular_node() argument
966 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
969 KUNIT_EXPECT_TRUE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
972 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
973 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&b, &list)); in hlist_test_is_singular_node()
976 static void hlist_test_empty(struct kunit *test) in hlist_test_empty() argument
982 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_empty()
987 KUNIT_EXPECT_FALSE(test, hlist_empty(&list)); in hlist_test_empty()
990 static void hlist_test_move_list(struct kunit *test) in hlist_test_move_list() argument
998 KUNIT_EXPECT_FALSE(test, hlist_empty(&list1)); in hlist_test_move_list()
999 KUNIT_EXPECT_TRUE(test, hlist_empty(&list2)); in hlist_test_move_list()
1001 KUNIT_EXPECT_TRUE(test, hlist_empty(&list1)); in hlist_test_move_list()
1002 KUNIT_EXPECT_FALSE(test, hlist_empty(&list2)); in hlist_test_move_list()
1006 static void hlist_test_entry(struct kunit *test) in hlist_test_entry() argument
1010 KUNIT_EXPECT_PTR_EQ(test, &test_struct, in hlist_test_entry()
1015 static void hlist_test_entry_safe(struct kunit *test) in hlist_test_entry_safe() argument
1019 KUNIT_EXPECT_PTR_EQ(test, &test_struct, in hlist_test_entry_safe()
1023 KUNIT_EXPECT_PTR_EQ(test, NULL, in hlist_test_entry_safe()
1028 static void hlist_test_for_each(struct kunit *test) in hlist_test_for_each() argument
1039 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in hlist_test_for_each()
1043 KUNIT_EXPECT_EQ(test, i, 3); in hlist_test_for_each()
1047 static void hlist_test_for_each_safe(struct kunit *test) in hlist_test_for_each_safe() argument
1058 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in hlist_test_for_each_safe()
1063 KUNIT_EXPECT_EQ(test, i, 3); in hlist_test_for_each_safe()
1064 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_for_each_safe()
1067 static void hlist_test_for_each_entry(struct kunit *test) in hlist_test_for_each_entry() argument
1083 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry()
1087 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry()
1090 static void hlist_test_for_each_entry_continue(struct kunit *test) in hlist_test_for_each_entry_continue() argument
1108 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_continue()
1114 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_continue()
1116 KUNIT_EXPECT_EQ(test, entries[0].data, 0); in hlist_test_for_each_entry_continue()
1118 KUNIT_EXPECT_EQ(test, entries[1].data, 42); in hlist_test_for_each_entry_continue()
1121 static void hlist_test_for_each_entry_from(struct kunit *test) in hlist_test_for_each_entry_from() argument
1138 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_from()
1144 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_from()
1146 KUNIT_EXPECT_EQ(test, entries[0].data, 42); in hlist_test_for_each_entry_from()
1149 static void hlist_test_for_each_entry_safe(struct kunit *test) in hlist_test_for_each_entry_safe() argument
1166 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_safe()
1171 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_safe()
1172 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_for_each_entry_safe()
1225 static void klist_test_add_tail(struct kunit *test) in klist_test_add_tail() argument
1235 KUNIT_EXPECT_EQ(test, node_count, 1); in klist_test_add_tail()
1236 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_tail()
1239 KUNIT_EXPECT_EQ(test, node_count, 2); in klist_test_add_tail()
1240 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_tail()
1245 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_tail()
1246 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_tail()
1247 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_tail()
1253 static void klist_test_add_head(struct kunit *test) in klist_test_add_head() argument
1263 KUNIT_EXPECT_EQ(test, node_count, 1); in klist_test_add_head()
1264 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_head()
1267 KUNIT_EXPECT_EQ(test, node_count, 2); in klist_test_add_head()
1268 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_head()
1273 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_head()
1274 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_head()
1275 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_head()
1281 static void klist_test_add_behind(struct kunit *test) in klist_test_add_behind() argument
1294 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_add_behind()
1295 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_add_behind()
1298 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_add_behind()
1299 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_add_behind()
1304 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_behind()
1305 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_add_behind()
1306 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_behind()
1307 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_add_behind()
1308 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_behind()
1314 static void klist_test_add_before(struct kunit *test) in klist_test_add_before() argument
1326 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_add_before()
1327 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_add_before()
1330 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_add_before()
1331 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_add_before()
1336 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_add_before()
1337 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_before()
1338 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_add_before()
1339 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_before()
1340 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_before()
1350 static void klist_test_del_refcount_greater_than_zero(struct kunit *test) in klist_test_del_refcount_greater_than_zero() argument
1367 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_del_refcount_greater_than_zero()
1368 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_del_refcount_greater_than_zero()
1370 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_del_refcount_greater_than_zero()
1380 KUNIT_EXPECT_TRUE(test, klist_node_attached(&c)); in klist_test_del_refcount_greater_than_zero()
1383 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_del_refcount_greater_than_zero()
1384 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_del_refcount_greater_than_zero()
1392 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_del_refcount_greater_than_zero()
1393 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_del_refcount_greater_than_zero()
1401 static void klist_test_del_refcount_zero(struct kunit *test) in klist_test_del_refcount_zero() argument
1419 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_del_refcount_zero()
1420 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_del_refcount_zero()
1425 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_del_refcount_zero()
1426 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_del_refcount_zero()
1427 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_del_refcount_zero()
1428 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_del_refcount_zero()
1434 static void klist_test_remove(struct kunit *test) in klist_test_remove() argument
1453 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_remove()
1454 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_remove()
1459 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_remove()
1460 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_remove()
1461 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_remove()
1462 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_remove()
1468 static void klist_test_node_attached(struct kunit *test) in klist_test_node_attached() argument
1475 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()
1477 KUNIT_EXPECT_TRUE(test, klist_node_attached(&a)); in klist_test_node_attached()
1479 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()