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()
105 KUNIT_EXPECT_PTR_EQ(test, a_new.next, &b); in list_test_list_replace()
106 KUNIT_EXPECT_PTR_EQ(test, a_new.prev, &list); in list_test_list_replace()
109 static void list_test_list_replace_init(struct kunit *test) in list_test_list_replace_init() argument
121 KUNIT_EXPECT_PTR_EQ(test, list.next, &a_new); in list_test_list_replace_init()
122 KUNIT_EXPECT_PTR_EQ(test, b.prev, &a_new); in list_test_list_replace_init()
123 KUNIT_EXPECT_PTR_EQ(test, a_new.next, &b); in list_test_list_replace_init()
124 KUNIT_EXPECT_PTR_EQ(test, a_new.prev, &list); in list_test_list_replace_init()
127 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a_old)); in list_test_list_replace_init()
130 static void list_test_list_swap(struct kunit *test) in list_test_list_swap() argument
142 KUNIT_EXPECT_PTR_EQ(test, &b, list.next); in list_test_list_swap()
143 KUNIT_EXPECT_PTR_EQ(test, &a, list.prev); in list_test_list_swap()
145 KUNIT_EXPECT_PTR_EQ(test, &a, b.next); in list_test_list_swap()
146 KUNIT_EXPECT_PTR_EQ(test, &list, b.prev); in list_test_list_swap()
148 KUNIT_EXPECT_PTR_EQ(test, &list, a.next); in list_test_list_swap()
149 KUNIT_EXPECT_PTR_EQ(test, &b, a.prev); in list_test_list_swap()
152 static void list_test_list_del_init(struct kunit *test) in list_test_list_del_init() argument
164 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_del_init()
165 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_del_init()
166 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a)); in list_test_list_del_init()
169 static void list_test_list_del_init_careful(struct kunit *test) in list_test_list_del_init_careful() argument
184 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_del_init_careful()
185 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_del_init_careful()
186 KUNIT_EXPECT_TRUE(test, list_empty_careful(&a)); in list_test_list_del_init_careful()
189 static void list_test_list_move(struct kunit *test) in list_test_list_move() argument
202 KUNIT_EXPECT_TRUE(test, list_empty(&list1)); in list_test_list_move()
204 KUNIT_EXPECT_PTR_EQ(test, &a, list2.next); in list_test_list_move()
205 KUNIT_EXPECT_PTR_EQ(test, &b, a.next); in list_test_list_move()
208 static void list_test_list_move_tail(struct kunit *test) in list_test_list_move_tail() argument
221 KUNIT_EXPECT_TRUE(test, list_empty(&list1)); in list_test_list_move_tail()
223 KUNIT_EXPECT_PTR_EQ(test, &b, list2.next); in list_test_list_move_tail()
224 KUNIT_EXPECT_PTR_EQ(test, &a, b.next); in list_test_list_move_tail()
227 static void list_test_list_bulk_move_tail(struct kunit *test) in list_test_list_bulk_move_tail() argument
250 KUNIT_EXPECT_PTR_EQ(test, ptr, list1_values[i]); in list_test_list_bulk_move_tail()
253 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_bulk_move_tail()
256 KUNIT_EXPECT_PTR_EQ(test, ptr, list2_values[i]); in list_test_list_bulk_move_tail()
259 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_bulk_move_tail()
262 static void list_test_list_is_head(struct kunit *test) in list_test_list_is_head() argument
271 KUNIT_EXPECT_TRUE_MSG(test, list_is_head(&a, &a), in list_test_list_is_head()
273 KUNIT_EXPECT_FALSE_MSG(test, list_is_head(&a, &b), in list_test_list_is_head()
275 KUNIT_EXPECT_FALSE_MSG(test, list_is_head(&a, &c), in list_test_list_is_head()
280 static void list_test_list_is_first(struct kunit *test) in list_test_list_is_first() argument
288 KUNIT_EXPECT_TRUE(test, list_is_first(&a, &list)); in list_test_list_is_first()
289 KUNIT_EXPECT_FALSE(test, list_is_first(&b, &list)); in list_test_list_is_first()
292 static void list_test_list_is_last(struct kunit *test) in list_test_list_is_last() argument
300 KUNIT_EXPECT_FALSE(test, list_is_last(&a, &list)); in list_test_list_is_last()
301 KUNIT_EXPECT_TRUE(test, list_is_last(&b, &list)); in list_test_list_is_last()
304 static void list_test_list_empty(struct kunit *test) in list_test_list_empty() argument
312 KUNIT_EXPECT_FALSE(test, list_empty(&list1)); in list_test_list_empty()
313 KUNIT_EXPECT_TRUE(test, list_empty(&list2)); in list_test_list_empty()
316 static void list_test_list_empty_careful(struct kunit *test) in list_test_list_empty_careful() argument
325 KUNIT_EXPECT_FALSE(test, list_empty_careful(&list1)); in list_test_list_empty_careful()
326 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_empty_careful()
329 static void list_test_list_rotate_left(struct kunit *test) in list_test_list_rotate_left() argument
341 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_rotate_left()
342 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_rotate_left()
343 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_rotate_left()
346 static void list_test_list_rotate_to_front(struct kunit *test) in list_test_list_rotate_to_front() argument
364 KUNIT_EXPECT_PTR_EQ(test, ptr, list_values[i]); in list_test_list_rotate_to_front()
367 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_rotate_to_front()
370 static void list_test_list_is_singular(struct kunit *test) in list_test_list_is_singular() argument
376 KUNIT_EXPECT_FALSE(test, list_is_singular(&list)); in list_test_list_is_singular()
381 KUNIT_EXPECT_TRUE(test, list_is_singular(&list)); in list_test_list_is_singular()
386 KUNIT_EXPECT_FALSE(test, list_is_singular(&list)); in list_test_list_is_singular()
389 static void list_test_list_cut_position(struct kunit *test) in list_test_list_cut_position() argument
405 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_position()
409 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_cut_position()
412 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_position()
417 static void list_test_list_cut_before(struct kunit *test) in list_test_list_cut_before() argument
433 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_before()
437 KUNIT_EXPECT_EQ(test, i, 1); in list_test_list_cut_before()
440 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_cut_before()
445 static void list_test_list_splice(struct kunit *test) in list_test_list_splice() argument
463 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice()
467 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice()
470 static void list_test_list_splice_tail(struct kunit *test) in list_test_list_splice_tail() argument
488 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_tail()
492 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail()
495 static void list_test_list_splice_init(struct kunit *test) in list_test_list_splice_init() argument
513 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_init()
517 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_init()
519 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_splice_init()
522 static void list_test_list_splice_tail_init(struct kunit *test) in list_test_list_splice_tail_init() argument
540 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_splice_tail_init()
544 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail_init()
546 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_splice_tail_init()
549 static void list_test_list_entry(struct kunit *test) in list_test_list_entry() argument
553 KUNIT_EXPECT_PTR_EQ(test, &test_struct, list_entry(&(test_struct.list), in list_test_list_entry()
557 static void list_test_list_entry_is_head(struct kunit *test) in list_test_list_entry_is_head() argument
566 KUNIT_EXPECT_TRUE_MSG(test, in list_test_list_entry_is_head()
569 KUNIT_EXPECT_FALSE_MSG(test, in list_test_list_entry_is_head()
572 KUNIT_EXPECT_FALSE_MSG(test, in list_test_list_entry_is_head()
577 static void list_test_list_first_entry(struct kunit *test) in list_test_list_first_entry() argument
586 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, list_first_entry(&list, in list_test_list_first_entry()
590 static void list_test_list_last_entry(struct kunit *test) in list_test_list_last_entry() argument
599 KUNIT_EXPECT_PTR_EQ(test, &test_struct2, list_last_entry(&list, in list_test_list_last_entry()
603 static void list_test_list_first_entry_or_null(struct kunit *test) in list_test_list_first_entry_or_null() argument
608 KUNIT_EXPECT_FALSE(test, list_first_entry_or_null(&list, in list_test_list_first_entry_or_null()
614 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, in list_test_list_first_entry_or_null()
619 static void list_test_list_next_entry(struct kunit *test) in list_test_list_next_entry() argument
628 KUNIT_EXPECT_PTR_EQ(test, &test_struct2, list_next_entry(&test_struct1, in list_test_list_next_entry()
632 static void list_test_list_prev_entry(struct kunit *test) in list_test_list_prev_entry() argument
641 KUNIT_EXPECT_PTR_EQ(test, &test_struct1, list_prev_entry(&test_struct2, in list_test_list_prev_entry()
645 static void list_test_list_for_each(struct kunit *test) in list_test_list_for_each() argument
656 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each()
660 KUNIT_EXPECT_EQ(test, i, 3); in list_test_list_for_each()
663 static void list_test_list_for_each_prev(struct kunit *test) in list_test_list_for_each_prev() argument
674 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_prev()
678 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev()
681 static void list_test_list_for_each_safe(struct kunit *test) in list_test_list_for_each_safe() argument
693 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_safe()
698 KUNIT_EXPECT_EQ(test, i, 3); in list_test_list_for_each_safe()
699 KUNIT_EXPECT_TRUE(test, list_empty(&list)); in list_test_list_for_each_safe()
702 static void list_test_list_for_each_prev_safe(struct kunit *test) in list_test_list_for_each_prev_safe() argument
713 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in list_test_list_for_each_prev_safe()
718 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev_safe()
719 KUNIT_EXPECT_TRUE(test, list_empty(&list)); in list_test_list_for_each_prev_safe()
722 static void list_test_list_for_each_entry(struct kunit *test) in list_test_list_for_each_entry() argument
736 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry()
740 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_for_each_entry()
743 static void list_test_list_for_each_entry_reverse(struct kunit *test) in list_test_list_for_each_entry_reverse() argument
757 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry_reverse()
761 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_entry_reverse()
817 static void hlist_test_init(struct kunit *test) in hlist_test_init() argument
835 KUNIT_EXPECT_TRUE(test, hlist_empty(&list1)); in hlist_test_init()
836 KUNIT_EXPECT_TRUE(test, hlist_empty(&list2)); in hlist_test_init()
837 KUNIT_EXPECT_TRUE(test, hlist_empty(&list3)); in hlist_test_init()
838 KUNIT_EXPECT_TRUE(test, hlist_empty(list4)); in hlist_test_init()
839 KUNIT_EXPECT_TRUE(test, hlist_empty(list5)); in hlist_test_init()
845 static void hlist_test_unhashed(struct kunit *test) in hlist_test_unhashed() argument
853 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
858 KUNIT_EXPECT_FALSE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
863 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
867 static void hlist_test_unhashed_lockless(struct kunit *test) in hlist_test_unhashed_lockless() argument
875 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
880 KUNIT_EXPECT_FALSE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
885 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
888 static void hlist_test_del(struct kunit *test) in hlist_test_del() argument
900 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_del()
901 KUNIT_EXPECT_PTR_EQ(test, b.pprev, &list.first); in hlist_test_del()
904 static void hlist_test_del_init(struct kunit *test) in hlist_test_del_init() argument
916 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_del_init()
917 KUNIT_EXPECT_PTR_EQ(test, b.pprev, &list.first); in hlist_test_del_init()
920 KUNIT_EXPECT_PTR_EQ(test, a.next, NULL); in hlist_test_del_init()
921 KUNIT_EXPECT_PTR_EQ(test, a.pprev, NULL); in hlist_test_del_init()
925 static void hlist_test_add(struct kunit *test) in hlist_test_add() argument
936 KUNIT_EXPECT_PTR_EQ(test, list.first, &b); in hlist_test_add()
938 KUNIT_EXPECT_PTR_EQ(test, c.pprev, &(b.next)); in hlist_test_add()
939 KUNIT_EXPECT_PTR_EQ(test, b.next, &c); in hlist_test_add()
941 KUNIT_EXPECT_PTR_EQ(test, a.pprev, &(c.next)); in hlist_test_add()
942 KUNIT_EXPECT_PTR_EQ(test, c.next, &a); in hlist_test_add()
944 KUNIT_EXPECT_PTR_EQ(test, d.pprev, &(a.next)); in hlist_test_add()
945 KUNIT_EXPECT_PTR_EQ(test, a.next, &d); in hlist_test_add()
949 static void hlist_test_fake(struct kunit *test) in hlist_test_fake() argument
956 KUNIT_EXPECT_FALSE(test, hlist_fake(&a)); in hlist_test_fake()
961 KUNIT_EXPECT_TRUE(test, hlist_fake(&a)); in hlist_test_fake()
964 static void hlist_test_is_singular_node(struct kunit *test) in hlist_test_is_singular_node() argument
970 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
973 KUNIT_EXPECT_TRUE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
976 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
977 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&b, &list)); in hlist_test_is_singular_node()
980 static void hlist_test_empty(struct kunit *test) in hlist_test_empty() argument
986 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_empty()
991 KUNIT_EXPECT_FALSE(test, hlist_empty(&list)); in hlist_test_empty()
994 static void hlist_test_move_list(struct kunit *test) in hlist_test_move_list() argument
1002 KUNIT_EXPECT_FALSE(test, hlist_empty(&list1)); in hlist_test_move_list()
1003 KUNIT_EXPECT_TRUE(test, hlist_empty(&list2)); in hlist_test_move_list()
1005 KUNIT_EXPECT_TRUE(test, hlist_empty(&list1)); in hlist_test_move_list()
1006 KUNIT_EXPECT_FALSE(test, hlist_empty(&list2)); in hlist_test_move_list()
1010 static void hlist_test_entry(struct kunit *test) in hlist_test_entry() argument
1014 KUNIT_EXPECT_PTR_EQ(test, &test_struct, in hlist_test_entry()
1019 static void hlist_test_entry_safe(struct kunit *test) in hlist_test_entry_safe() argument
1023 KUNIT_EXPECT_PTR_EQ(test, &test_struct, in hlist_test_entry_safe()
1027 KUNIT_EXPECT_PTR_EQ(test, NULL, in hlist_test_entry_safe()
1032 static void hlist_test_for_each(struct kunit *test) in hlist_test_for_each() argument
1043 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in hlist_test_for_each()
1047 KUNIT_EXPECT_EQ(test, i, 3); in hlist_test_for_each()
1051 static void hlist_test_for_each_safe(struct kunit *test) in hlist_test_for_each_safe() argument
1062 KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); in hlist_test_for_each_safe()
1067 KUNIT_EXPECT_EQ(test, i, 3); in hlist_test_for_each_safe()
1068 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_for_each_safe()
1071 static void hlist_test_for_each_entry(struct kunit *test) in hlist_test_for_each_entry() argument
1087 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry()
1091 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry()
1094 static void hlist_test_for_each_entry_continue(struct kunit *test) in hlist_test_for_each_entry_continue() argument
1112 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_continue()
1118 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_continue()
1120 KUNIT_EXPECT_EQ(test, entries[0].data, 0); in hlist_test_for_each_entry_continue()
1122 KUNIT_EXPECT_EQ(test, entries[1].data, 42); in hlist_test_for_each_entry_continue()
1125 static void hlist_test_for_each_entry_from(struct kunit *test) in hlist_test_for_each_entry_from() argument
1142 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_from()
1148 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_from()
1150 KUNIT_EXPECT_EQ(test, entries[0].data, 42); in hlist_test_for_each_entry_from()
1153 static void hlist_test_for_each_entry_safe(struct kunit *test) in hlist_test_for_each_entry_safe() argument
1170 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_safe()
1175 KUNIT_EXPECT_EQ(test, i, 5); in hlist_test_for_each_entry_safe()
1176 KUNIT_EXPECT_TRUE(test, hlist_empty(&list)); in hlist_test_for_each_entry_safe()
1223 static void klist_test_add_tail(struct kunit *test) in klist_test_add_tail() argument
1233 KUNIT_EXPECT_EQ(test, node_count, 1); in klist_test_add_tail()
1234 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_tail()
1237 KUNIT_EXPECT_EQ(test, node_count, 2); in klist_test_add_tail()
1238 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_tail()
1243 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_tail()
1244 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_tail()
1245 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_tail()
1251 static void klist_test_add_head(struct kunit *test) in klist_test_add_head() argument
1261 KUNIT_EXPECT_EQ(test, node_count, 1); in klist_test_add_head()
1262 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_head()
1265 KUNIT_EXPECT_EQ(test, node_count, 2); in klist_test_add_head()
1266 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_head()
1271 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_head()
1272 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_head()
1273 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_head()
1279 static void klist_test_add_behind(struct kunit *test) in klist_test_add_behind() argument
1292 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_add_behind()
1293 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_add_behind()
1296 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_add_behind()
1297 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_add_behind()
1302 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_behind()
1303 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_add_behind()
1304 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_behind()
1305 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_add_behind()
1306 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_behind()
1312 static void klist_test_add_before(struct kunit *test) in klist_test_add_before() argument
1324 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_add_before()
1325 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_add_before()
1328 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_add_before()
1329 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_add_before()
1334 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_add_before()
1335 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_before()
1336 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_add_before()
1337 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_before()
1338 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_add_before()
1348 static void klist_test_del_refcount_greater_than_zero(struct kunit *test) in klist_test_del_refcount_greater_than_zero() argument
1365 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_del_refcount_greater_than_zero()
1366 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_del_refcount_greater_than_zero()
1368 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &c); in klist_test_del_refcount_greater_than_zero()
1378 KUNIT_EXPECT_TRUE(test, klist_node_attached(&c)); in klist_test_del_refcount_greater_than_zero()
1381 KUNIT_EXPECT_EQ(test, node_count, 4); in klist_test_del_refcount_greater_than_zero()
1382 KUNIT_EXPECT_PTR_EQ(test, last_node, &d); in klist_test_del_refcount_greater_than_zero()
1390 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_del_refcount_greater_than_zero()
1391 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_del_refcount_greater_than_zero()
1399 static void klist_test_del_refcount_zero(struct kunit *test) in klist_test_del_refcount_zero() argument
1417 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_del_refcount_zero()
1418 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_del_refcount_zero()
1423 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_del_refcount_zero()
1424 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_del_refcount_zero()
1425 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_del_refcount_zero()
1426 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_del_refcount_zero()
1432 static void klist_test_remove(struct kunit *test) in klist_test_remove() argument
1451 KUNIT_EXPECT_EQ(test, node_count, 3); in klist_test_remove()
1452 KUNIT_EXPECT_PTR_EQ(test, last_node, &c); in klist_test_remove()
1457 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_remove()
1458 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_remove()
1459 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &d); in klist_test_remove()
1460 KUNIT_EXPECT_NULL(test, klist_next(&i)); in klist_test_remove()
1466 static void klist_test_node_attached(struct kunit *test) in klist_test_node_attached() argument
1473 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()
1475 KUNIT_EXPECT_TRUE(test, klist_node_attached(&a)); in klist_test_node_attached()
1477 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()