* [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests
@ 2026-09-25 19:25 Karl Mehltretter
2026-09-26 7:53 ` Jeremy Kerr
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Karl Mehltretter @ 2026-09-25 19:25 UTC (permalink / raw)
To: Jeremy Kerr, Matt Johnston
Cc: Karl Mehltretter, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, netdev, Geert Uytterhoeven,
Brendan Higgins, David Gow, Rae Moar, linux-kselftest, kunit-dev,
linux-kernel
MCTP_TEST selects MCTP_FLOWS, which also enables SKB_EXTENSIONS when no
transport requires them. Remove the selection to follow the dependency
rule in Documentation/dev-tools/kunit/style.rst.
The two flow-specific tests already skip when MCTP_FLOWS is disabled.
The remaining tests can run in either configuration.
Fixes: 109a5331143d ("net: mctp: tests: Test that outgoing skbs have flow data populated")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
Validation on net-next 42a9fb3382fc: x86_64 LLVM builds and QEMU runs
with MCTP_FLOWS disabled and enabled. Both suites pass. With flow support
disabled, only the two flow-specific cases skip. The enabled configuration
uses the I2C transport to select MCTP_FLOWS.
net/mctp/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/mctp/Kconfig b/net/mctp/Kconfig
index d8d3413a37f7..3a5c0e70da77 100644
--- a/net/mctp/Kconfig
+++ b/net/mctp/Kconfig
@@ -14,7 +14,6 @@ menuconfig MCTP
config MCTP_TEST
bool "MCTP core tests" if !KUNIT_ALL_TESTS
- select MCTP_FLOWS
depends on MCTP=y && KUNIT=y
default KUNIT_ALL_TESTS
base-commit: 42a9fb3382fc2573e92f41d203b095d9a372cfc9
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests
2026-09-25 19:25 [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests Karl Mehltretter
@ 2026-09-26 7:53 ` Jeremy Kerr
2026-09-26 8:43 ` Karl Mehltretter
2026-09-28 20:53 ` [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support Karl Mehltretter
2026-09-28 23:09 ` [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests netdev-bot+sashiko
2 siblings, 1 reply; 7+ messages in thread
From: Jeremy Kerr @ 2026-09-26 7:53 UTC (permalink / raw)
To: Karl Mehltretter, Matt Johnston
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, netdev, Geert Uytterhoeven, Brendan Higgins,
David Gow, Rae Moar, linux-kselftest, kunit-dev, linux-kernel
Hi Karl,
> MCTP_TEST selects MCTP_FLOWS, which also enables SKB_EXTENSIONS when no
> transport requires them.
But we want to test the flows support, why disable this (and
consequently skip the flow tests in the vast majority of test runs)?
> Remove the selection to follow the dependency
> rule in Documentation/dev-tools/kunit/style.rst.
That suggests "depending on", rather than removing the coverage.
Cheers,
Jeremy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests
2026-09-26 7:53 ` Jeremy Kerr
@ 2026-09-26 8:43 ` Karl Mehltretter
0 siblings, 0 replies; 7+ messages in thread
From: Karl Mehltretter @ 2026-09-26 8:43 UTC (permalink / raw)
To: Jeremy Kerr
Cc: Matt Johnston, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, netdev, Geert Uytterhoeven,
Brendan Higgins, David Gow, Rae Moar, linux-kselftest, kunit-dev,
linux-kernel
On Sat, Sep 26, 2026 at 03:53:28PM +0100, Jeremy Kerr wrote:
> Hi Karl,
>
> > MCTP_TEST selects MCTP_FLOWS, which also enables SKB_EXTENSIONS when no
> > transport requires them.
>
> But we want to test the flows support, why disable this (and
> consequently skip the flow tests in the vast majority of test runs)?
>
> > Remove the selection to follow the dependency
> > rule in Documentation/dev-tools/kunit/style.rst.
>
> That suggests "depending on", rather than removing the coverage.
>
Hi Jeremy,
Thanks for the review!
OK, I can change that.
I was confused by the existing !MCTP_FLOWS fallbacks, but now understand
that you want the suite to retain full flow-test coverage.
Karl
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support
2026-09-25 19:25 [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests Karl Mehltretter
2026-09-26 7:53 ` Jeremy Kerr
@ 2026-09-28 20:53 ` Karl Mehltretter
2026-09-29 1:02 ` Jeremy Kerr
2026-09-28 23:09 ` [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests netdev-bot+sashiko
2 siblings, 1 reply; 7+ messages in thread
From: Karl Mehltretter @ 2026-09-28 20:53 UTC (permalink / raw)
To: Jeremy Kerr, Matt Johnston
Cc: Karl Mehltretter, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, netdev, Geert Uytterhoeven,
Brendan Higgins, David Gow, Rae Moar, linux-kselftest, kunit-dev,
linux-kernel
MCTP_TEST selects MCTP_FLOWS, which also enables SKB_EXTENSIONS when no
transport requires them. Enabling tests should not silently enable
additional kernel functionality.
Make the tests depend on MCTP_FLOWS instead, following the dependency
rule in Documentation/dev-tools/kunit/style.rst.
This keeps the full flow-test coverage: the suite is available only
when flow support is enabled, for example by the I2C transport.
Fixes: 109a5331143d ("net: mctp: tests: Test that outgoing skbs have flow data populated")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
Changes in v2:
- Depend on MCTP_FLOWS instead of removing the selection, as Jeremy
requested, to retain full flow-test coverage.
- Rebase onto current net-next (014d795c7383).
v1: https://lore.kernel.org/r/20260925192510.93840-1-kmehltretter@gmail.com/
Review: https://lore.kernel.org/r/8edc4e71edceb124e2dca233cddb75e198b53a51.camel@codeconstruct.com.au/
Validation on net-next 014d795c7383: x86_64 GCC 15.2 builds and QEMU
run. Both MCTP suites pass all 80 cases, including both flow tests,
with no skips. Kconfig checks cover flow support on/off,
KUNIT_ALL_TESTS on/off and a module I2C transport.
net/mctp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mctp/Kconfig b/net/mctp/Kconfig
index d8d3413a37f7..e64d4f7ef6aa 100644
--- a/net/mctp/Kconfig
+++ b/net/mctp/Kconfig
@@ -14,7 +14,7 @@ menuconfig MCTP
config MCTP_TEST
bool "MCTP core tests" if !KUNIT_ALL_TESTS
- select MCTP_FLOWS
+ depends on MCTP_FLOWS
depends on MCTP=y && KUNIT=y
default KUNIT_ALL_TESTS
base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d
--
2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests
2026-09-25 19:25 [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests Karl Mehltretter
2026-09-26 7:53 ` Jeremy Kerr
2026-09-28 20:53 ` [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support Karl Mehltretter
@ 2026-09-28 23:09 ` netdev-bot+sashiko
2 siblings, 0 replies; 7+ messages in thread
From: netdev-bot+sashiko @ 2026-09-28 23:09 UTC (permalink / raw)
To: kmehltretter
Cc: jk, matt, davem, edumazet, kuba, pabeni, horms, netdev, geert,
brendan.higgins, david, raemoar63, linux-kselftest, kunit-dev,
linux-kernel
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The patch removes `select MCTP_FLOWS` from `config MCTP_TEST`
in net/mctp/Kconfig.
--
net: mctp: Stop selecting flow support for KUnit tests
This commit removes "select MCTP_FLOWS" from MCTP_TEST in net/mctp/Kconfig.
The selection also enabled SKB_EXTENSIONS, and KUnit style guidance says
tests should not pull in dependencies this way. The two flow-specific tests
already skip when MCTP_FLOWS is disabled.
> diff --git a/net/mctp/Kconfig b/net/mctp/Kconfig
> index d8d3413a37f7e..3a5c0e70da776 100644
> --- a/net/mctp/Kconfig
> +++ b/net/mctp/Kconfig
> @@ -14,7 +14,6 @@ menuconfig MCTP
>
> config MCTP_TEST
> bool "MCTP core tests" if !KUNIT_ALL_TESTS
> - select MCTP_FLOWS
[Severity: Medium]
Will this break kunit.py run --alltests? tools/testing/kunit/configs/all_tests.config
still asks for flow support:
tools/testing/kunit/configs/all_tests.config:
CONFIG_NET=y
CONFIG_MCTP=y
CONFIG_MCTP_FLOWS=y
Commit 109a5331143d, the one named in the Fixes: tag, added this line
together with the select.
MCTP_FLOWS is a bool with no prompt and no default:
net/mctp/Kconfig:
config MCTP_FLOWS
bool
depends on MCTP
select SKB_EXTENSIONS
That means a config fragment cannot turn it on. Only a select can.
After this patch the only selector left is MCTP_TRANSPORT_I2C in
drivers/net/mctp/Kconfig. That symbol depends on I2C_SLAVE, and neither
one is on by default or set in all_tests.config. So after olddefconfig,
MCTP_FLOWS stays unset in the generated .config.
validate_config() in tools/testing/kunit/kunit_kernel.py then calls
Kconfig.is_subset_of() in kunit_config.py:
b = other._entries.get(name)
if b is None:
if value == 'n':
continue
return False
This returns False for CONFIG_MCTP_FLOWS=y. The run then stops at config
time with "Not all Kconfig options selected in kunitconfig were in the
generated .config", before any KUnit suite is built. That affects every
suite in the all-tests run, not only the MCTP ones.
Should all_tests.config be updated in this patch as well? One option is to
drop CONFIG_MCTP_FLOWS=y. In that case mctp_test_packet_flow() and
mctp_test_fragment_flow() in net/mctp/test/route-test.c would always skip
in the all-tests configuration.
Another option is to replace the line with CONFIG_I2C_SLAVE=y and
CONFIG_MCTP_TRANSPORT_I2C=y. The flow tests would then still run. That
matches the validation notes, which say the enabled configuration used the
I2C transport to select MCTP_FLOWS.
Since the patch carries a Fixes: tag, a stable backport would bring this
mismatch along with it.
> depends on MCTP=y && KUNIT=y
> default KUNIT_ALL_TESTS
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260925192510.93840-1-kmehltretter%40gmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support
2026-09-28 20:53 ` [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support Karl Mehltretter
@ 2026-09-29 1:02 ` Jeremy Kerr
2026-09-29 5:34 ` Karl Mehltretter
0 siblings, 1 reply; 7+ messages in thread
From: Jeremy Kerr @ 2026-09-29 1:02 UTC (permalink / raw)
To: Karl Mehltretter, Matt Johnston
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, netdev, Geert Uytterhoeven, Brendan Higgins,
David Gow, Rae Moar, linux-kselftest, kunit-dev, linux-kernel
Hi Karl,
> MCTP_TEST selects MCTP_FLOWS, which also enables SKB_EXTENSIONS when no
> transport requires them. Enabling tests should not silently enable
> additional kernel functionality.
>
> Make the tests depend on MCTP_FLOWS instead, following the dependency
> rule in Documentation/dev-tools/kunit/style.rst.
[...]
> index d8d3413a37f7..e64d4f7ef6aa 100644
> --- a/net/mctp/Kconfig
> +++ b/net/mctp/Kconfig
> @@ -14,7 +14,7 @@ menuconfig MCTP
>
> config MCTP_TEST
> bool "MCTP core tests" if !KUNIT_ALL_TESTS
> - select MCTP_FLOWS
> + depends on MCTP_FLOWS
> depends on MCTP=y && KUNIT=y
> default KUNIT_ALL_TESTS
>
Now _the whole suite_ is not going to get enabled for the usual kunit
testing, since flows isn't individually selectable.
> This keeps the full flow-test coverage: the suite is available only
> when flow support is enabled, for example by the I2C transport.
Hardware transports are typically not enabled for kunit test kernels.
Are you attempting to fix an actual problem you're encountering? What's
the aim with this change?
Cheers,
Jeremy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support
2026-09-29 1:02 ` Jeremy Kerr
@ 2026-09-29 5:34 ` Karl Mehltretter
0 siblings, 0 replies; 7+ messages in thread
From: Karl Mehltretter @ 2026-09-29 5:34 UTC (permalink / raw)
To: Jeremy Kerr
Cc: Matt Johnston, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, netdev, Geert Uytterhoeven,
Brendan Higgins, David Gow, Rae Moar, linux-kselftest, kunit-dev,
linux-kernel
On Tue, Sep 29, 2026 at 09:02:23AM +0100, Jeremy Kerr wrote:
> > This keeps the full flow-test coverage: the suite is available only
> > when flow support is enabled, for example by the I2C transport.
>
> Hardware transports are typically not enabled for kunit test kernels.
>
> Are you attempting to fix an actual problem you're encountering? What's
> the aim with this change?
>
Hi Jeremy,
It's no real-world MCTP workload bug. This came from a similar issue in
my 842 KUnit patch: the test selected the decompressor. Geert pointed
out that tests should not silently enable otherwise-unused code:
https://lore.kernel.org/r/CAMuHMdVcZ5cV4-HrjLYfFKh6UshiVxq5eXCNyp0Z1k_SMAvF5g@mail.gmail.com/
My goal is to keep KUNIT_ALL_TESTS from pulling in otherwise-unused
production code. An explicit opt-in could preserve the coverage,
following CRC_ENABLE_ALL_FOR_KUNIT and CRYPTO_LIB_ENABLE_ALL_FOR_KUNIT:
- MCTP_ENABLE_ALL_FOR_KUNIT depends on KUNIT=y and MCTP=y
- it selects MCTP_FLOWS
- all_tests.config enables it
- MCTP_TEST depends on MCTP_FLOWS
This keeps KUNIT_ALL_TESTS from enabling optional flow code, while the
explicit kunit.py run --alltests profile opts into it and retains full
flow coverage without requiring a hardware transport.
Would that approach work for you?
Karl
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-29 5:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 19:25 [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests Karl Mehltretter
2026-09-26 7:53 ` Jeremy Kerr
2026-09-26 8:43 ` Karl Mehltretter
2026-09-28 20:53 ` [PATCH net-next v2] net: mctp: Make KUnit tests depend on flow support Karl Mehltretter
2026-09-29 1:02 ` Jeremy Kerr
2026-09-29 5:34 ` Karl Mehltretter
2026-09-28 23:09 ` [PATCH net-next] net: mctp: Stop selecting flow support for KUnit tests netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®