* [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE
@ 2020-10-15 12:08 Vitor Massaru Iha
2020-10-16 18:42 ` Brendan Higgins
0 siblings, 1 reply; 3+ messages in thread
From: Vitor Massaru Iha @ 2020-10-15 12:08 UTC (permalink / raw)
To: sfr, skhan, brendanhiggins, kunit-dev, johannes
Cc: linux-kernel, linux-next, linux-kselftest
A build condition was missing around a compilation test, this compilation
test comes from the original test_bitfield code.
And removed unnecessary code for this test.
Fixes: d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
Link: https://lore.kernel.org/linux-next/20201015163056.56fcc835@canb.auug.org.au/
---
lib/bitfield_kunit.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/bitfield_kunit.c b/lib/bitfield_kunit.c
index d63a2be5aff8..1473d8b4bf0f 100644
--- a/lib/bitfield_kunit.c
+++ b/lib/bitfield_kunit.c
@@ -125,7 +125,7 @@ static void __init test_bitfields_variables(struct kunit *context)
CHECK(u64, 0x0000001f8000000ull);
}
-
+#ifdef TEST_BITFIELD_COMPILE
static void __init test_bitfields_compile(struct kunit *context)
{
/* these should fail compilation */
@@ -135,13 +135,11 @@ static void __init test_bitfields_compile(struct kunit *context)
/* this should at least give a warning */
u16_encode_bits(0, 0x60000);
}
+#endif
static struct kunit_case __refdata bitfields_test_cases[] = {
KUNIT_CASE(test_bitfields_constants),
KUNIT_CASE(test_bitfields_variables),
-#ifdef TEST_BITFIELD_COMPILE
- KUNIT_CASE(test_bitfields_compile),
-#endif
{}
};
base-commit: d2585f5164c298aaaed14c2c8d313cbe7bd5b253
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE
2020-10-15 12:08 [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE Vitor Massaru Iha
@ 2020-10-16 18:42 ` Brendan Higgins
2020-10-16 19:31 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Brendan Higgins @ 2020-10-16 18:42 UTC (permalink / raw)
To: Vitor Massaru Iha
Cc: Stephen Rothwell, Shuah Khan, KUnit Development, Johannes Berg,
Linux Kernel Mailing List, Linux Next Mailing List,
open list:KERNEL SELFTEST FRAMEWORK
On Thu, Oct 15, 2020 at 5:08 AM Vitor Massaru Iha <vitor@massaru.org> wrote:
>
> A build condition was missing around a compilation test, this compilation
> test comes from the original test_bitfield code.
>
> And removed unnecessary code for this test.
>
> Fixes: d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
> Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
> Link: https://lore.kernel.org/linux-next/20201015163056.56fcc835@canb.auug.org.au/
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Thanks for taking care of this so quickly!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE
2020-10-16 18:42 ` Brendan Higgins
@ 2020-10-16 19:31 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2020-10-16 19:31 UTC (permalink / raw)
To: Brendan Higgins, Vitor Massaru Iha
Cc: Stephen Rothwell, KUnit Development, Johannes Berg,
Linux Kernel Mailing List, Linux Next Mailing List,
open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan
On 10/16/20 12:42 PM, Brendan Higgins wrote:
> On Thu, Oct 15, 2020 at 5:08 AM Vitor Massaru Iha <vitor@massaru.org> wrote:
>>
>> A build condition was missing around a compilation test, this compilation
>> test comes from the original test_bitfield code.
>>
>> And removed unnecessary code for this test.
>>
>> Fixes: d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
>> Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
>> Link: https://lore.kernel.org/linux-next/20201015163056.56fcc835@canb.auug.org.au/
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
>
> Thanks for taking care of this so quickly!
>
Thank you both.
Applied to linux-kselftest kunit branch
I will send the pull request with this in a day or two.
Added Reported-by for Stephen. Thanks for finding the problem.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-16 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 12:08 [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE Vitor Massaru Iha
2020-10-16 18:42 ` Brendan Higgins
2020-10-16 19:31 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).