[PATCH net] Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests"

4 views
Skip to first unread message

Jakub Kicinski

unread,
May 30, 2025, 9:58:07 AM5/30/25
to da...@davemloft.net, net...@vger.kernel.org, Jakub Kicinski, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, r...@opensource.cirrus.com, m...@digikod.net, sk...@linuxfoundation.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.

The commit in question breaks kunit for older compilers:

$ gcc --version
gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)

$ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64
Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=x86_64 O=.kunit olddefconfig
ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
This is probably due to unsatisfied dependencies.
Missing: CONFIG_INIT_STACK_ALL_PATTERN=y

Link: https://lore.kernel.org/20250529083...@kernel.org
Fixes: a571a9a1b120 ("kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests")
Signed-off-by: Jakub Kicinski <ku...@kernel.org>
---
I'd like to take this in via netdev since it fixes our CI.
We'll send it to Linus next week.

CC: brendan...@linux.dev
CC: davi...@google.com
CC: rm...@google.com
CC: bro...@kernel.org
CC: r...@opensource.cirrus.com
CC: m...@digikod.net
CC: sk...@linuxfoundation.org
CC: linux-k...@vger.kernel.org
CC: kuni...@googlegroups.com
---
tools/testing/kunit/configs/all_tests.config | 1 -
1 file changed, 1 deletion(-)

diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
index 48b132cd9d2a..2f093048d985 100644
--- a/tools/testing/kunit/configs/all_tests.config
+++ b/tools/testing/kunit/configs/all_tests.config
@@ -10,7 +10,6 @@ CONFIG_KUNIT_EXAMPLE_TEST=y
CONFIG_KUNIT_ALL_TESTS=y

CONFIG_FORTIFY_SOURCE=y
-CONFIG_INIT_STACK_ALL_PATTERN=y

CONFIG_IIO=y

--
2.49.0

Mark Brown

unread,
May 30, 2025, 11:09:24 AM5/30/25
to Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, r...@opensource.cirrus.com, m...@digikod.net, sk...@linuxfoundation.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
On Fri, May 30, 2025 at 06:58:00AM -0700, Jakub Kicinski wrote:
> This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.

Please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read especially when they have no internet access.
I do frequently catch up on my mail on flights or while otherwise
travelling so this is even more pressing for me than just being about
making things a bit easier to read.

> The commit in question breaks kunit for older compilers:

> $ gcc --version
> gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
>
> $ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64
> Configuring KUnit Kernel ...
> Regenerating .config ...
> Populating config with:
> $ make ARCH=x86_64 O=.kunit olddefconfig
> ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
> This is probably due to unsatisfied dependencies.
> Missing: CONFIG_INIT_STACK_ALL_PATTERN=y

This seems like there's a bigger issue here - this sort of thing will
keep happening if you're running with older compilers and it's also
going to be prevent the addition of any coverage that's specific to
architectures. It would seem better to fix this by warning only and not
erroring out, perhaps splitting the config fragments into must succeed
and can be dropped sections.
signature.asc

Mark Brown

unread,
May 30, 2025, 11:16:26 AM5/30/25
to Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, r...@opensource.cirrus.com, m...@digikod.net, sk...@linuxfoundation.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
Sorry, meant to also say:

Acked-by: Mark Brown <bro...@kernel.org>
signature.asc

Shuah Khan

unread,
May 30, 2025, 12:59:59 PM5/30/25
to Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, r...@opensource.cirrus.com, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Shuah Khan
On 5/30/25 07:58, Jakub Kicinski wrote:
> This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.
>
> The commit in question breaks kunit for older compilers:
> > $ gcc --version
> gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
>
> $ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64
> Configuring KUnit Kernel ...
> Regenerating .config ...
> Populating config with:
> $ make ARCH=x86_64 O=.kunit olddefconfig


> ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
> This is probably due to unsatisfied dependencies.
> Missing: CONFIG_INIT_STACK_ALL_PATTERN=y

Does adding config option work for you?
./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_INIT_STACK_ALL_PATTERN


>
> Link: https://lore.kernel.org/20250529083...@kernel.org
> Fixes: a571a9a1b120 ("kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests")
> Signed-off-by: Jakub Kicinski <ku...@kernel.org>
> ---
> I'd like to take this in via netdev since it fixes our CI.
> We'll send it to Linus next week.
>

I am good with reverting it for now.

David, Brendan,
We will have to enable this at a later time. Also we saw this problem
before with other configs. Anyway way to fix this for alltests case?

thanks,
-- Shuah


Shuah Khan

unread,
May 30, 2025, 1:04:10 PM5/30/25
to Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, r...@opensource.cirrus.com, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Shuah Khan
On 5/30/25 10:59, Shuah Khan wrote:
> On 5/30/25 07:58, Jakub Kicinski wrote:
>> This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.
>>
>> The commit in question breaks kunit for older compilers:
>> > $ gcc --version
>>   gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
>>
>> $ ./tools/testing/kunit/kunit.py run  --alltests --json --arch=x86_64
>>   Configuring KUnit Kernel ...
>>   Regenerating .config ...
>>   Populating config with:
>>   $ make ARCH=x86_64 O=.kunit olddefconfig
>
>
>>   ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
>>   This is probably due to unsatisfied dependencies.
>>   Missing: CONFIG_INIT_STACK_ALL_PATTERN=y
>
> Does adding config option work for you?
> ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_INIT_STACK_ALL_PATTERN
>
>
>>
>> Link: https://lore.kernel.org/20250529083...@kernel.org
>> Fixes: a571a9a1b120 ("kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests")
>> Signed-off-by: Jakub Kicinski <ku...@kernel.org>
>> ---
>> I'd like to take this in via netdev since it fixes our CI.
>> We'll send it to Linus next week.
>>
>
> I am good with reverting it for now.
Meant to add Ack.

Acked-by: Shuah Khan <sk...@linuxfoundation.org>

Jakub Kicinski

unread,
May 30, 2025, 9:07:53 PM5/30/25
to Shuah Khan, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, r...@opensource.cirrus.com, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com
On Fri, 30 May 2025 10:59:54 -0600 Shuah Khan wrote:
> On 5/30/25 07:58, Jakub Kicinski wrote:
> > This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.
> >
> > The commit in question breaks kunit for older compilers:
> > > $ gcc --version
> > gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
> >
> > $ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64
> > Configuring KUnit Kernel ...
> > Regenerating .config ...
> > Populating config with:
> > $ make ARCH=x86_64 O=.kunit olddefconfig
>
>
> > ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
> > This is probably due to unsatisfied dependencies.
> > Missing: CONFIG_INIT_STACK_ALL_PATTERN=y
>
> Does adding config option work for you?
> ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_INIT_STACK_ALL_PATTERN

Nope (with this patch applied):

$ ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_INIT_STACK_ALL_PATTERN=y
[18:02:47] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
This is probably due to unsatisfied dependencies.
Missing: CONFIG_INIT_STACK_ALL_PATTERN=y
Note: many Kconfig options aren't available on UML. You can try running on a different architecture with something like "--arch=x86_64".

> > Link: https://lore.kernel.org/20250529083...@kernel.org
> > Fixes: a571a9a1b120 ("kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests")
> > Signed-off-by: Jakub Kicinski <ku...@kernel.org>
> > ---
> > I'd like to take this in via netdev since it fixes our CI.
> > We'll send it to Linus next week.
> >
>
> I am good with reverting it for now.
>
> David, Brendan,
> We will have to enable this at a later time. Also we saw this problem
> before with other configs. Anyway way to fix this for alltests case?

FWIW Richard commented in the linked thread, IIUC this was just for
added coverage but not a hard requirement.

Richard Fitzgerald

unread,
Jun 2, 2025, 9:07:42 AM6/2/25
to Jakub Kicinski, Shuah Khan, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com
Correct. It's not required (for me). It found a bug in my code, so it
seemed useful to have enabled while testing. I thought this was safe to
do, I didn't know that this only works with certain platforms and
compilers.

Richard Fitzgerald

unread,
Jun 2, 2025, 9:34:43 AM6/2/25
to Jakub Kicinski, Shuah Khan, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com
On 31/05/2025 2:07 am, Jakub Kicinski wrote:

Shuah Khan

unread,
Jun 2, 2025, 6:24:45 PM6/2/25
to Richard Fitzgerald, Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, m...@digikod.net, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Shuah Khan
Thanks for clarifying. Looks good to me.

thanks,
-- Shuah

patchwork-b...@kernel.org

unread,
Jun 3, 2025, 5:29:57 AM6/3/25
to Jakub Kicinski, da...@davemloft.net, net...@vger.kernel.org, brendan...@linux.dev, davi...@google.com, rm...@google.com, bro...@kernel.org, r...@opensource.cirrus.com, m...@digikod.net, sk...@linuxfoundation.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pab...@redhat.com>:

On Fri, 30 May 2025 06:58:00 -0700 you wrote:
> This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84.
>
> The commit in question breaks kunit for older compilers:
>
> $ gcc --version
> gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
>
> [...]

Here is the summary with links:
- [net] Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests"
https://git.kernel.org/netdev/net/c/f6695269dc52

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


Reply all
Reply to author
Forward
0 new messages