Skip to content

Commit 34db4fb

Browse files
sergiocolladoshuahkh
authored andcommitted
kunit: fix longest symbol length test
The kunit test that checks the longests symbol length [1], has triggered warnings in some pilelines when symbol prefixes are used [2][3]. The test will to depend on !PREFIX_SYMBOLS and !CFI_CLANG as sujested in [4] and on !GCOV_KERNEL. [1] https://lore.kernel.org/rust-for-linux/CABVgOSm=5Q0fM6neBhxSbOUHBgNzmwf2V22vsYC10YRBT=kN1g@mail.gmail.com/T/#t [2] https://lore.kernel.org/all/20250328112156.2614513-1-arnd@kernel.org/T/#u [3] https://lore.kernel.org/rust-for-linux/bbd03b37-c4d9-4a92-9be2-75aaf8c19815@infradead.org/T/#t [4] https://lore.kernel.org/linux-kselftest/20250427200916.GA1661412@ax162/T/#t Link: https://lore.kernel.org/r/20250706201855.232451-1-sergio.collado@gmail.com Reviewed-by: Rae Moar <rmoar@google.com> Signed-off-by: Sergio González Collado <sergio.collado@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 5ac244b commit 34db4fb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,6 +2885,7 @@ config FORTIFY_KUNIT_TEST
28852885
config LONGEST_SYM_KUNIT_TEST
28862886
tristate "Test the longest symbol possible" if !KUNIT_ALL_TESTS
28872887
depends on KUNIT && KPROBES
2888+
depends on !PREFIX_SYMBOLS && !CFI_CLANG && !GCOV_KERNEL
28882889
default KUNIT_ALL_TESTS
28892890
help
28902891
Tests the longest symbol possible

lib/tests/longest_symbol_kunit.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* Test the longest symbol length. Execute with:
44
* ./tools/testing/kunit/kunit.py run longest-symbol
55
* --arch=x86_64 --kconfig_add CONFIG_KPROBES=y --kconfig_add CONFIG_MODULES=y
6-
* --kconfig_add CONFIG_RETPOLINE=n --kconfig_add CONFIG_CFI_CLANG=n
7-
* --kconfig_add CONFIG_MITIGATION_RETPOLINE=n
6+
* --kconfig_add CONFIG_CPU_MITIGATIONS=n --kconfig_add CONFIG_GCOV_KERNEL=n
87
*/
98

109
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

0 commit comments

Comments
 (0)