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_smav...@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

Reply via email to