Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit294a7f1

Browse files
ihashuahkh
authored andcommitted
lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE
A build condition was missing around a compilation test, this compilationtest comes from the original test_bitfield code.And removed unnecessary code for this test.Fixes:d2585f5 ("lib: kunit: add bitfield test conversion to KUnit")Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>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>Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parentd2585f5 commit294a7f1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎lib/bitfield_kunit.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static void __init test_bitfields_variables(struct kunit *context)
125125
CHECK(u64,0x0000001f8000000ull);
126126
}
127127

128-
128+
#ifdefTEST_BITFIELD_COMPILE
129129
staticvoid__inittest_bitfields_compile(structkunit*context)
130130
{
131131
/* these should fail compilation */
@@ -135,13 +135,11 @@ static void __init test_bitfields_compile(struct kunit *context)
135135
/* this should at least give a warning */
136136
u16_encode_bits(0,0x60000);
137137
}
138+
#endif
138139

139140
staticstructkunit_case__refdatabitfields_test_cases[]= {
140141
KUNIT_CASE(test_bitfields_constants),
141142
KUNIT_CASE(test_bitfields_variables),
142-
#ifdefTEST_BITFIELD_COMPILE
143-
KUNIT_CASE(test_bitfields_compile),
144-
#endif
145143
{}
146144
};
147145

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp