* [PATCH] kunit: fix longest symbol length test
@ 2025-04-27 19:10 Sergio González Collado
2025-04-27 20:09 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: Sergio González Collado @ 2025-04-27 19:10 UTC (permalink / raw)
To: David Gow, Rae Moar, linux-kselftest, kunit-dev, Miguel Ojeda,
Boqun Feng, Arnd Bergmann
Cc: rust-for-linux, Josh Poimboeuf, Steven Rostedt, Peter Zijlstra,
Nathan Chancellor, David Laight, Shuah Khan,
Martin Rodriguez Reboredo, x86, linux-kbuild,
Sergio González Collado
The kunit test that checks the longests symbol length [1], has triggered
warnings in some CI pilelines when symbol prefixes are used [2]. The test
is adjusted to depend on !CONFIG_PREFIX_SYMBOLS as sujested in [3].
[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/all/ycgbf7jcq7nc62ndqiynogt6hkabgl3hld4uyelgo7rksylf32@oysq7jpchtp4/
Fixes: c104c16073b7 ("Kunit to check the longest symbol length")
Signed-off-by: Sergio González Collado <sergio.collado@gmail.com>
---
lib/Kconfig.debug | 2 +-
lib/tests/longest_symbol_kunit.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f9051ab610d5..6937dedce04d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2885,7 +2885,7 @@ config FORTIFY_KUNIT_TEST
config LONGEST_SYM_KUNIT_TEST
tristate "Test the longest symbol possible" if !KUNIT_ALL_TESTS
- depends on KUNIT && KPROBES
+ depends on KUNIT && KPROBES && !CONFIG_PREFIX_SYMBOLS
default KUNIT_ALL_TESTS
help
Tests the longest symbol possible
diff --git a/lib/tests/longest_symbol_kunit.c b/lib/tests/longest_symbol_kunit.c
index e3c28ff1807f..b183fb92d1b2 100644
--- a/lib/tests/longest_symbol_kunit.c
+++ b/lib/tests/longest_symbol_kunit.c
@@ -3,8 +3,7 @@
* Test the longest symbol length. Execute with:
* ./tools/testing/kunit/kunit.py run longest-symbol
* --arch=x86_64 --kconfig_add CONFIG_KPROBES=y --kconfig_add CONFIG_MODULES=y
- * --kconfig_add CONFIG_RETPOLINE=n --kconfig_add CONFIG_CFI_CLANG=n
- * --kconfig_add CONFIG_MITIGATION_RETPOLINE=n
+ * --kconfig_add CONFIG_CPU_MITIGATIONS=n
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
base-commit: f1a3944c860b0615d0513110d8cf62bb94adbb41
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kunit: fix longest symbol length test
2025-04-27 19:10 [PATCH] kunit: fix longest symbol length test Sergio González Collado
@ 2025-04-27 20:09 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2025-04-27 20:09 UTC (permalink / raw)
To: Sergio González Collado
Cc: David Gow, Rae Moar, linux-kselftest, kunit-dev, Miguel Ojeda,
Boqun Feng, Arnd Bergmann, rust-for-linux, Josh Poimboeuf,
Steven Rostedt, Peter Zijlstra, David Laight, Shuah Khan,
Martin Rodriguez Reboredo, x86, linux-kbuild
Hi Sergio,
On Sun, Apr 27, 2025 at 09:10:09PM +0200, Sergio González Collado wrote:
> The kunit test that checks the longests symbol length [1], has triggered
> warnings in some CI pilelines when symbol prefixes are used [2]. The test
> is adjusted to depend on !CONFIG_PREFIX_SYMBOLS as sujested in [3].
>
> [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/all/ycgbf7jcq7nc62ndqiynogt6hkabgl3hld4uyelgo7rksylf32@oysq7jpchtp4/
>
> Fixes: c104c16073b7 ("Kunit to check the longest symbol length")
> Signed-off-by: Sergio González Collado <sergio.collado@gmail.com>
> ---
> lib/Kconfig.debug | 2 +-
> lib/tests/longest_symbol_kunit.c | 3 +--
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index f9051ab610d5..6937dedce04d 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2885,7 +2885,7 @@ config FORTIFY_KUNIT_TEST
>
> config LONGEST_SYM_KUNIT_TEST
> tristate "Test the longest symbol possible" if !KUNIT_ALL_TESTS
> - depends on KUNIT && KPROBES
> + depends on KUNIT && KPROBES && !CONFIG_PREFIX_SYMBOLS
This should be !PREFIX_SYMBOLS, otherwise it would be looking for a
CONFIG_CONFIG_PREFIX_SYMBOLS not to exist, which will always be true.
This solution does not appear to take into account Peter's comment
around how kCFI will prefix these symbols as well? Should it depend on
!CFI_CLANG as well?
https://lore.kernel.org/20250411065054.GM9833@noisy.programming.kicks-ass.net/
> default KUNIT_ALL_TESTS
> help
> Tests the longest symbol possible
> diff --git a/lib/tests/longest_symbol_kunit.c b/lib/tests/longest_symbol_kunit.c
> index e3c28ff1807f..b183fb92d1b2 100644
> --- a/lib/tests/longest_symbol_kunit.c
> +++ b/lib/tests/longest_symbol_kunit.c
> @@ -3,8 +3,7 @@
> * Test the longest symbol length. Execute with:
> * ./tools/testing/kunit/kunit.py run longest-symbol
> * --arch=x86_64 --kconfig_add CONFIG_KPROBES=y --kconfig_add CONFIG_MODULES=y
> - * --kconfig_add CONFIG_RETPOLINE=n --kconfig_add CONFIG_CFI_CLANG=n
> - * --kconfig_add CONFIG_MITIGATION_RETPOLINE=n
> + * --kconfig_add CONFIG_CPU_MITIGATIONS=n
> */
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> base-commit: f1a3944c860b0615d0513110d8cf62bb94adbb41
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-27 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-27 19:10 [PATCH] kunit: fix longest symbol length test Sergio González Collado
2025-04-27 20:09 ` Nathan Chancellor
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).