Lines Matching +full:a +full:- +full:b
1 // SPDX-License-Identifier: GPL-2.0
3 * KUnit test for the Kernel Linked-list structures.
20 /* Test the different ways of initialising a list. */ in list_test_list_init()
49 struct list_head a, b; in list_test_list_add() local
52 list_add(&a, &list); in list_test_list_add()
53 list_add(&b, &list); in list_test_list_add()
55 /* should be [list] -> b -> a */ in list_test_list_add()
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()
63 struct list_head a, b; in list_test_list_add_tail() local
66 list_add_tail(&a, &list); in list_test_list_add_tail()
67 list_add_tail(&b, &list); in list_test_list_add_tail()
69 /* should be [list] -> a -> b */ in list_test_list_add_tail()
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()
77 struct list_head a, b; in list_test_list_del() local
80 list_add_tail(&a, &list); in list_test_list_del()
81 list_add_tail(&b, &list); in list_test_list_del()
83 /* before: [list] -> a -> b */ in list_test_list_del()
84 list_del(&a); in list_test_list_del()
86 /* now: [list] -> b */ in list_test_list_del()
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()
93 struct list_head a_old, a_new, b; in list_test_list_replace() local
97 list_add_tail(&b, &list); in list_test_list_replace()
99 /* before: [list] -> a_old -> b */ in list_test_list_replace()
102 /* now: [list] -> a_new -> b */ 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()
111 struct list_head a_old, a_new, b; in list_test_list_replace_init() local
115 list_add_tail(&b, &list); in list_test_list_replace_init()
117 /* before: [list] -> a_old -> b */ in list_test_list_replace_init()
120 /* now: [list] -> a_new -> b */ 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()
132 struct list_head a, b; in list_test_list_swap() local
135 list_add_tail(&a, &list); in list_test_list_swap()
136 list_add_tail(&b, &list); in list_test_list_swap()
138 /* before: [list] -> a -> b */ in list_test_list_swap()
139 list_swap(&a, &b); in list_test_list_swap()
141 /* after: [list] -> b -> a */ in list_test_list_swap()
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()
154 struct list_head a, b; in list_test_list_del_init() local
157 list_add_tail(&a, &list); in list_test_list_del_init()
158 list_add_tail(&b, &list); in list_test_list_del_init()
160 /* before: [list] -> a -> b */ in list_test_list_del_init()
161 list_del_init(&a); in list_test_list_del_init()
162 /* after: [list] -> b, a initialised */ in list_test_list_del_init()
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()
174 struct list_head a, b; in list_test_list_del_init_careful() local
177 list_add_tail(&a, &list); in list_test_list_del_init_careful()
178 list_add_tail(&b, &list); in list_test_list_del_init_careful()
180 /* before: [list] -> a -> b */ in list_test_list_del_init_careful()
181 list_del_init_careful(&a); in list_test_list_del_init_careful()
182 /* after: [list] -> b, a initialised */ in list_test_list_del_init_careful()
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()
191 struct list_head a, b; in list_test_list_move() local
195 list_add_tail(&a, &list1); in list_test_list_move()
196 list_add_tail(&b, &list2); in list_test_list_move()
198 /* before: [list1] -> a, [list2] -> b */ in list_test_list_move()
199 list_move(&a, &list2); in list_test_list_move()
200 /* after: [list1] empty, [list2] -> a -> b */ 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()
210 struct list_head a, b; in list_test_list_move_tail() local
214 list_add_tail(&a, &list1); in list_test_list_move_tail()
215 list_add_tail(&b, &list2); in list_test_list_move_tail()
217 /* before: [list1] -> a, [list2] -> b */ in list_test_list_move_tail()
218 list_move_tail(&a, &list2); in list_test_list_move_tail()
219 /* after: [list1] empty, [list2] -> b -> a */ 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()
229 struct list_head a, b, c, d, x, y; in list_test_list_bulk_move_tail() local
230 struct list_head *list1_values[] = { &x, &b, &c, &y }; in list_test_list_bulk_move_tail()
231 struct list_head *list2_values[] = { &a, &d }; in list_test_list_bulk_move_tail()
240 list_add_tail(&a, &list2); in list_test_list_bulk_move_tail()
241 list_add_tail(&b, &list2); in list_test_list_bulk_move_tail()
245 /* before: [list1] -> x -> y, [list2] -> a -> b -> c -> d */ in list_test_list_bulk_move_tail()
246 list_bulk_move_tail(&y, &b, &c); in list_test_list_bulk_move_tail()
247 /* after: [list1] -> x -> b -> c -> y, [list2] -> a -> d */ in list_test_list_bulk_move_tail()
264 struct list_head a, b, c; in list_test_list_is_head() local
266 /* Two lists: [a] -> b, [c] */ in list_test_list_is_head()
267 INIT_LIST_HEAD(&a); in list_test_list_is_head()
269 list_add_tail(&b, &a); in list_test_list_is_head()
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()
274 "Non-head element of same list"); in list_test_list_is_head()
275 KUNIT_EXPECT_FALSE_MSG(test, list_is_head(&a, &c), in list_test_list_is_head()
282 struct list_head a, b; in list_test_list_is_first() local
285 list_add_tail(&a, &list); in list_test_list_is_first()
286 list_add_tail(&b, &list); in list_test_list_is_first()
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()
294 struct list_head a, b; in list_test_list_is_last() local
297 list_add_tail(&a, &list); in list_test_list_is_last()
298 list_add_tail(&b, &list); in list_test_list_is_last()
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()
306 struct list_head a; in list_test_list_empty() local
310 list_add_tail(&a, &list1); in list_test_list_empty()
319 struct list_head a; in list_test_list_empty_careful() local
323 list_add_tail(&a, &list1); in list_test_list_empty_careful()
331 struct list_head a, b; in list_test_list_rotate_left() local
334 list_add_tail(&a, &list); in list_test_list_rotate_left()
335 list_add_tail(&b, &list); in list_test_list_rotate_left()
337 /* before: [list] -> a -> b */ in list_test_list_rotate_left()
339 /* after: [list] -> b -> a */ in list_test_list_rotate_left()
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()
348 struct list_head a, b, c, d; in list_test_list_rotate_to_front() local
349 struct list_head *list_values[] = { &c, &d, &a, &b }; in list_test_list_rotate_to_front()
354 list_add_tail(&a, &list); in list_test_list_rotate_to_front()
355 list_add_tail(&b, &list); in list_test_list_rotate_to_front()
359 /* before: [list] -> a -> b -> c -> d */ in list_test_list_rotate_to_front()
361 /* after: [list] -> c -> d -> a -> b */ in list_test_list_rotate_to_front()
372 struct list_head a, b; in list_test_list_is_singular() local
378 list_add_tail(&a, &list); in list_test_list_is_singular()
380 /* [list] -> a */ in list_test_list_is_singular()
383 list_add_tail(&b, &list); in list_test_list_is_singular()
385 /* [list] -> a -> b */ in list_test_list_is_singular()
400 /* before: [list1] -> entries[0] -> entries[1] -> entries[2] */ in list_test_list_cut_position()
402 /* after: [list2] -> entries[0] -> entries[1], [list1] -> entries[2] */ in list_test_list_cut_position()
428 /* before: [list1] -> entries[0] -> entries[1] -> entries[2] */ in list_test_list_cut_before()
430 /* after: [list2] -> entries[0], [list1] -> entries[1] -> entries[2] */ in list_test_list_cut_before()
458 /* before: [list1]->e[0]->e[1]->e[4], [list2]->e[2]->e[3] */ in list_test_list_splice()
460 /* after: [list1]->e[0]->e[1]->e[2]->e[3]->e[4], [list2] uninit */ in list_test_list_splice()
483 /* before: [list1]->e[0]->e[1]->e[4], [list2]->e[2]->e[3] */ in list_test_list_splice_tail()
485 /* after: [list1]->e[0]->e[1]->e[2]->e[3]->e[4], [list2] uninit */ in list_test_list_splice_tail()
508 /* before: [list1]->e[0]->e[1]->e[4], [list2]->e[2]->e[3] */ in list_test_list_splice_init()
510 /* after: [list1]->e[0]->e[1]->e[2]->e[3]->e[4], [list2] empty */ in list_test_list_splice_init()
535 /* before: [list1]->e[0]->e[1]->e[4], [list2]->e[2]->e[3] */ in list_test_list_splice_tail_init()
537 /* after: [list1]->e[0]->e[1]->e[2]->e[3]->e[4], [list2] empty */ in list_test_list_splice_tail_init()
571 "Non-head element of same list"); in list_test_list_entry_is_head()
675 i--; in list_test_list_for_each_prev()
678 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev()
715 i--; in list_test_list_for_each_prev_safe()
718 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_prev_safe()
736 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry()
757 KUNIT_EXPECT_EQ(test, cur->data, i); in list_test_list_for_each_entry_reverse()
758 i--; in list_test_list_for_each_entry_reverse()
761 KUNIT_EXPECT_EQ(test, i, -1); in list_test_list_for_each_entry_reverse()
808 .name = "list-kunit-test",
819 /* Test the different ways of initialising a list. */ in hlist_test_init()
847 struct hlist_node a; in hlist_test_unhashed() local
850 INIT_HLIST_NODE(&a); in hlist_test_unhashed()
853 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
855 hlist_add_head(&a, &list); in hlist_test_unhashed()
858 KUNIT_EXPECT_FALSE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
860 hlist_del_init(&a); in hlist_test_unhashed()
863 KUNIT_EXPECT_TRUE(test, hlist_unhashed(&a)); in hlist_test_unhashed()
869 struct hlist_node a; in hlist_test_unhashed_lockless() local
872 INIT_HLIST_NODE(&a); in hlist_test_unhashed_lockless()
875 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
877 hlist_add_head(&a, &list); in hlist_test_unhashed_lockless()
880 KUNIT_EXPECT_FALSE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
882 hlist_del_init(&a); in hlist_test_unhashed_lockless()
885 KUNIT_EXPECT_TRUE(test, hlist_unhashed_lockless(&a)); in hlist_test_unhashed_lockless()
890 struct hlist_node a, b; in hlist_test_del() local
893 hlist_add_head(&a, &list); in hlist_test_del()
894 hlist_add_behind(&b, &a); in hlist_test_del()
896 /* before: [list] -> a -> b */ in hlist_test_del()
897 hlist_del(&a); in hlist_test_del()
899 /* now: [list] -> b */ in hlist_test_del()
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()
906 struct hlist_node a, b; in hlist_test_del_init() local
909 hlist_add_head(&a, &list); in hlist_test_del_init()
910 hlist_add_behind(&b, &a); in hlist_test_del_init()
912 /* before: [list] -> a -> b */ in hlist_test_del_init()
913 hlist_del_init(&a); in hlist_test_del_init()
915 /* now: [list] -> b */ in hlist_test_del_init()
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()
919 /* a is now initialised */ 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()
927 struct hlist_node a, b, c, d; in hlist_test_add() local
930 hlist_add_head(&a, &list); in hlist_test_add()
931 hlist_add_head(&b, &list); in hlist_test_add()
932 hlist_add_before(&c, &a); in hlist_test_add()
933 hlist_add_behind(&d, &a); in hlist_test_add()
935 /* should be [list] -> b -> c -> a -> d */ in hlist_test_add()
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()
951 struct hlist_node a; in hlist_test_fake() local
953 INIT_HLIST_NODE(&a); in hlist_test_fake()
956 KUNIT_EXPECT_FALSE(test, hlist_fake(&a)); in hlist_test_fake()
958 hlist_add_fake(&a); in hlist_test_fake()
961 KUNIT_EXPECT_TRUE(test, hlist_fake(&a)); in hlist_test_fake()
966 struct hlist_node a, b; in hlist_test_is_singular_node() local
969 INIT_HLIST_NODE(&a); in hlist_test_is_singular_node()
970 KUNIT_EXPECT_FALSE(test, hlist_is_singular_node(&a, &list)); in hlist_test_is_singular_node()
972 hlist_add_head(&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()
975 hlist_add_head(&b, &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()
982 struct hlist_node a; in hlist_test_empty() local
988 hlist_add_head(&a, &list); in hlist_test_empty()
996 struct hlist_node a; in hlist_test_move_list() local
1000 hlist_add_head(&a, &list1); in hlist_test_move_list()
1081 hlist_add_behind(&entries[i].list, &entries[i-1].list); in hlist_test_for_each_entry()
1087 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry()
1104 hlist_add_behind(&entries[i].list, &entries[i-1].list); in hlist_test_for_each_entry_continue()
1107 /* We skip the first (zero-th) entry. */ in hlist_test_for_each_entry_continue()
1112 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_continue()
1114 cur->data = 42; in hlist_test_for_each_entry_continue()
1135 hlist_add_behind(&entries[i].list, &entries[i-1].list); in hlist_test_for_each_entry_from()
1142 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_from()
1144 cur->data = 42; in hlist_test_for_each_entry_from()
1164 hlist_add_behind(&entries[i].list, &entries[i-1].list); in hlist_test_for_each_entry_safe()
1170 KUNIT_EXPECT_EQ(test, cur->data, i); in hlist_test_for_each_entry_safe()
1171 hlist_del(&cur->list); in hlist_test_for_each_entry_safe()
1219 node_count--; in check_delete_node()
1225 struct klist_node a, b; in klist_test_add_tail() local
1232 klist_add_tail(&a, &mylist); in klist_test_add_tail()
1234 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_tail()
1236 klist_add_tail(&b, &mylist); in klist_test_add_tail()
1238 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_tail()
1240 /* should be [list] -> a -> 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()
1253 struct klist_node a, b; in klist_test_add_head() local
1260 klist_add_head(&a, &mylist); in klist_test_add_head()
1262 KUNIT_EXPECT_PTR_EQ(test, last_node, &a); in klist_test_add_head()
1264 klist_add_head(&b, &mylist); in klist_test_add_head()
1266 KUNIT_EXPECT_PTR_EQ(test, last_node, &b); in klist_test_add_head()
1268 /* should be [list] -> b -> a */ 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()
1281 struct klist_node a, b, c, d; in klist_test_add_behind() local
1288 klist_add_head(&a, &mylist); in klist_test_add_behind()
1289 klist_add_head(&b, &mylist); in klist_test_add_behind()
1291 klist_add_behind(&c, &a); in klist_test_add_behind()
1295 klist_add_behind(&d, &b); in klist_test_add_behind()
1301 /* should be [list] -> b -> d -> a -> c*/ in klist_test_add_behind()
1302 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_behind()
1304 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_behind()
1314 struct klist_node a, b, c, d; in klist_test_add_before() local
1321 klist_add_head(&a, &mylist); in klist_test_add_before()
1322 klist_add_head(&b, &mylist); in klist_test_add_before()
1323 klist_add_before(&c, &a); in klist_test_add_before()
1327 klist_add_before(&d, &b); in klist_test_add_before()
1333 /* should be [list] -> b -> d -> a -> c*/ in klist_test_add_before()
1335 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &b); in klist_test_add_before()
1337 KUNIT_EXPECT_PTR_EQ(test, klist_next(&i), &a); in klist_test_add_before()
1345 * Verify that klist_del() delays the deletion of a node until there
1350 struct klist_node a, b, c, d; in klist_test_del_refcount_greater_than_zero() local
1357 /* Add nodes a,b,c,d to the list*/ in klist_test_del_refcount_greater_than_zero()
1358 klist_add_tail(&a, &mylist); in klist_test_del_refcount_greater_than_zero()
1359 klist_add_tail(&b, &mylist); in klist_test_del_refcount_greater_than_zero()
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()
1370 /* Try to delete node c while there is a reference to it*/ in klist_test_del_refcount_greater_than_zero()
1396 * Verify that klist_del() deletes a node immediately when there are no
1401 struct klist_node a, b, c, d; in klist_test_del_refcount_zero() local
1408 /* Add nodes a,b,c,d to the list*/ in klist_test_del_refcount_zero()
1409 klist_add_tail(&a, &mylist); in klist_test_del_refcount_zero()
1410 klist_add_tail(&b, &mylist); in klist_test_del_refcount_zero()
1420 /* Should be [list] -> a -> b -> d*/ 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()
1435 struct klist_node a, b, c, d; in klist_test_remove() local
1442 /* Add nodes a,b,c,d to the list*/ in klist_test_remove()
1443 klist_add_tail(&a, &mylist); in klist_test_remove()
1444 klist_add_tail(&b, &mylist); in klist_test_remove()
1454 /* should be [list] -> a -> b -> d*/ 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()
1468 struct klist_node a = {}; in klist_test_node_attached() local
1473 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()
1474 klist_add_head(&a, &mylist); in klist_test_node_attached()
1475 KUNIT_EXPECT_TRUE(test, klist_node_attached(&a)); in klist_test_node_attached()
1476 klist_del(&a); in klist_test_node_attached()
1477 KUNIT_EXPECT_FALSE(test, klist_node_attached(&a)); in klist_test_node_attached()
1500 MODULE_DESCRIPTION("KUnit test for the Kernel Linked-list structures");