* [PATCH] Revert "list: test: fix tests for list_cut_position()"
@ 2024-09-22 15:05 Guenter Roeck
2024-09-30 23:18 ` Jacob Keller
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2024-09-22 15:05 UTC (permalink / raw)
To: David Gow
Cc: linux-kselftest, kunit-dev, linux-kernel, Guenter Roeck,
I Hsin Cheng, Andrew Morton
This reverts commit e620799c414a035dea1208bcb51c869744931dbb.
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.
Fixes: e620799c414a ("list: test: fix tests for list_cut_position()")
Cc: I Hsin Cheng <richard120310@gmail.com>
Cc: David Gow <davidgow@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
lib/list-test.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/lib/list-test.c b/lib/list-test.c
index 4f3dc75baec1..e207c4c98d70 100644
--- a/lib/list-test.c
+++ b/lib/list-test.c
@@ -408,13 +408,10 @@ static void list_test_list_cut_position(struct kunit *test)
KUNIT_EXPECT_EQ(test, i, 2);
- i = 0;
list_for_each(cur, &list1) {
KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
i++;
}
-
- KUNIT_EXPECT_EQ(test, i, 1);
}
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);
- i = 0;
list_for_each(cur, &list1) {
KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
i++;
}
-
- KUNIT_EXPECT_EQ(test, i, 2);
}
static void list_test_list_splice(struct kunit *test)
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"
2024-09-22 15:05 [PATCH] Revert "list: test: fix tests for list_cut_position()" Guenter Roeck
@ 2024-09-30 23:18 ` Jacob Keller
2024-10-02 20:39 ` Shuah Khan
0 siblings, 1 reply; 4+ messages in thread
From: Jacob Keller @ 2024-09-30 23:18 UTC (permalink / raw)
To: Guenter Roeck
Cc: akpm, davidgow, kunit-dev, linux-kernel, linux-kselftest,
richard120310
On 9/22/2024 8:05 AM, Guenter Roeck wrote:
> This reverts commit e620799c414a035dea1208bcb51c869744931dbb.
>
> 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.
>
> Fixes: e620799c414a ("list: test: fix tests for list_cut_position()")
> Cc: I Hsin Cheng <richard120310@gmail.com>
> Cc: David Gow <davidgow@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
I ran into this as well.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> lib/list-test.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/lib/list-test.c b/lib/list-test.c
> index 4f3dc75baec1..e207c4c98d70 100644
> --- a/lib/list-test.c
> +++ b/lib/list-test.c
> @@ -408,13 +408,10 @@ static void list_test_list_cut_position(struct kunit *test)
>
> KUNIT_EXPECT_EQ(test, i, 2);
>
> - i = 0;
> list_for_each(cur, &list1) {
> KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
> i++;
> }
> -
> - KUNIT_EXPECT_EQ(test, i, 1);
> }
>
> 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);
>
> - i = 0;
> list_for_each(cur, &list1) {
> KUNIT_EXPECT_PTR_EQ(test, cur, &entries[i]);
> i++;
> }
> -
> - KUNIT_EXPECT_EQ(test, i, 2);
This test failure was also pointed out during an earlier review of the
patch..
> https://lore.kernel.org/all/CABVgOSmn=SEwq3je3+vJ-S1Rwb=cLT2a3_WKOQsHu9xZYEZhrg@mail.gmail.com/
I suspect what we really want here is an explicit check against the
length of the lists.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"
2024-09-30 23:18 ` Jacob Keller
@ 2024-10-02 20:39 ` Shuah Khan
2024-10-03 6:51 ` David Gow
0 siblings, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2024-10-02 20:39 UTC (permalink / raw)
To: Jacob Keller, Guenter Roeck, David Gow
Cc: akpm, davidgow, kunit-dev, linux-kernel, linux-kselftest,
richard120310, Shuah Khan
On 9/30/24 17:18, Jacob Keller wrote:
>
>
> On 9/22/2024 8:05 AM, Guenter Roeck wrote:
>> This reverts commit e620799c414a035dea1208bcb51c869744931dbb.
>>
>> 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.
>>
>> Fixes: e620799c414a ("list: test: fix tests for list_cut_position()")
>> Cc: I Hsin Cheng <richard120310@gmail.com>
>> Cc: David Gow <davidgow@google.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>
> I ran into this as well.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
>
Please take a look and let me know if you are okay with this patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"
2024-10-02 20:39 ` Shuah Khan
@ 2024-10-03 6:51 ` David Gow
0 siblings, 0 replies; 4+ messages in thread
From: David Gow @ 2024-10-03 6:51 UTC (permalink / raw)
To: Shuah Khan
Cc: Jacob Keller, Guenter Roeck, akpm, kunit-dev, linux-kernel,
linux-kselftest, richard120310
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
On Thu, 3 Oct 2024 at 04:39, Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 9/30/24 17:18, Jacob Keller wrote:
> >
> >
> > On 9/22/2024 8:05 AM, Guenter Roeck wrote:
> >> This reverts commit e620799c414a035dea1208bcb51c869744931dbb.
> >>
> >> 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.
> >>
> >> Fixes: e620799c414a ("list: test: fix tests for list_cut_position()")
> >> Cc: I Hsin Cheng <richard120310@gmail.com>
> >> Cc: David Gow <davidgow@google.com>
> >> Cc: Andrew Morton <akpm@linux-foundation.org>
> >> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> >> ---
> >
> > I ran into this as well.
> >
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> >
>
> Please take a look and let me know if you are okay with this patch.
This (and the original patch which was reverted) were both picked up
via another tree and have already been applied to torvalds/master.
A re-work of the original patch is in
https://lore.kernel.org/linux-kselftest/20240930170633.42475-1-richard120310@gmail.com/
-- it looks fine to me (modulo the description being a bit confusing)
and should be applied as a new patch, ignoring this and the previous
version.
-- David
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5294 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-03 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 15:05 [PATCH] Revert "list: test: fix tests for list_cut_position()" Guenter Roeck
2024-09-30 23:18 ` Jacob Keller
2024-10-02 20:39 ` Shuah Khan
2024-10-03 6:51 ` David Gow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox