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 <[email protected]>
---
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/[email protected]/
Review:
https://lore.kernel.org/r/8edc4e71edceb124e2dca233cddb75e198b53a51.ca...@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)