summaryrefslogtreecommitdiffstats
path: root/lib/list-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/list-test.c')
-rw-r--r--lib/list-test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/list-test.c b/lib/list-test.c
index 0cc27de9cec8..e207c4c98d70 100644
--- a/lib/list-test.c
+++ b/lib/list-test.c
@@ -102,6 +102,8 @@ static void list_test_list_replace(struct kunit *test)
/* now: [list] -> a_new -> b */
KUNIT_EXPECT_PTR_EQ(test, list.next, &a_new);
KUNIT_EXPECT_PTR_EQ(test, b.prev, &a_new);
+ KUNIT_EXPECT_PTR_EQ(test, a_new.next, &b);
+ KUNIT_EXPECT_PTR_EQ(test, a_new.prev, &list);
}
static void list_test_list_replace_init(struct kunit *test)
@@ -118,6 +120,8 @@ static void list_test_list_replace_init(struct kunit *test)
/* now: [list] -> a_new -> b */
KUNIT_EXPECT_PTR_EQ(test, list.next, &a_new);
KUNIT_EXPECT_PTR_EQ(test, b.prev, &a_new);
+ KUNIT_EXPECT_PTR_EQ(test, a_new.next, &b);
+ KUNIT_EXPECT_PTR_EQ(test, a_new.prev, &list);
/* check a_old is empty (initialized) */
KUNIT_EXPECT_TRUE(test, list_empty_careful(&a_old));
@@ -1201,12 +1205,6 @@ static struct kunit_suite hlist_test_module = {
};
-struct klist_test_struct {
- int data;
- struct klist klist;
- struct klist_node klist_node;
-};
-
static int node_count;
static struct klist_node *last_node;
@@ -1499,4 +1497,5 @@ static struct kunit_suite klist_test_module = {
kunit_test_suites(&list_test_module, &hlist_test_module, &klist_test_module);
+MODULE_DESCRIPTION("KUnit test for the Kernel Linked-list structures");
MODULE_LICENSE("GPL v2");