Skip to contentSkip to conversation

list-test-increasing-coverage-of-list_test_list_replace.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 17, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: list: test: increase coverage of list_test_list_replace*()
has been removed from the -mm tree. Its filename was
list-test-increasing-coverage-of-list_test_list_replace.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: I Hsin Cheng <[email protected]>
Subject: list: test: increase coverage of list_test_list_replace*()
Date: Tue, 10 Sep 2024 12:08:18 +0800

Increase the test coverage of list_test_list_replace*() by adding the checks to compare the pointer of "a_new.next" and "a_new.prev" to make sure a perfect circular doubly linked list is formed after the replacement.

---

 lib/list-test.c |    4 ++++
 1 file changed, 4 insertions(+)
lib/list-test.c renamed from lib/list-test.c~list-test-increasing-coverage-of-list_test_list_replace +4 -0
@@ -102,6 +102,8 @@ static void list_test_list_replace(struc
 	/* 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(
 	/* 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));

_

Patches currently in -mm which might be from [email protected] are