Commit c509f67d authored by Guenter Roeck's avatar Guenter Roeck Committed by Andrew Morton

Revert "list: test: fix tests for list_cut_position()"

This reverts commit e620799c.

The commit introduces unit test failures.

     Expected cur == &entries[i], but
         cur == 0000037fffadfd80
         &entries[i] == 0000037fffadfd60
     # list_test_list_cut_position: pass:0 fail:1 skip:0 total:1
     not ok 21 list_test_list_cut_position
     # list_test_list_cut_before: EXPECTATION FAILED at lib/list-test.c:444
     Expected cur == &entries[i], but
         cur == 0000037fffa9fd70
         &entries[i] == 0000037fffa9fd60
     # list_test_list_cut_before: EXPECTATION FAILED at lib/list-test.c:444
     Expected cur == &entries[i], but
         cur == 0000037fffa9fd80
         &entries[i] == 0000037fffa9fd70

Revert it.

Link: https://lkml.kernel.org/r/20240922150507.553814-1-linux@roeck-us.net
Fixes: e620799c ("list: test: fix tests for list_cut_position()")
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Cc: I Hsin Cheng <richard120310@gmail.com>
Cc: David Gow <davidgow@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f30beffd
...@@ -408,13 +408,10 @@ static void list_test_list_cut_position(struct kunit *test) ...@@ -408,13 +408,10 @@ static void list_test_list_cut_position(struct kunit *test)
KUNIT_EXPECT_EQ(test, i, 2); KUNIT_EXPECT_EQ(test, i, 2);
i = 0;
list_for_each(cur, &list1) { list_for_each(cur, &list1) {
KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
i++; i++;
} }
KUNIT_EXPECT_EQ(test, i, 1);
} }
static void list_test_list_cut_before(struct kunit *test) static void list_test_list_cut_before(struct kunit *test)
...@@ -439,13 +436,10 @@ static void list_test_list_cut_before(struct kunit *test) ...@@ -439,13 +436,10 @@ static void list_test_list_cut_before(struct kunit *test)
KUNIT_EXPECT_EQ(test, i, 1); KUNIT_EXPECT_EQ(test, i, 1);
i = 0;
list_for_each(cur, &list1) { list_for_each(cur, &list1) {
KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]); KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
i++; i++;
} }
KUNIT_EXPECT_EQ(test, i, 2);
} }
static void list_test_list_splice(struct kunit *test) static void list_test_list_splice(struct kunit *test)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment