🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Geert Uytterhoeven Mon, 12 Oct 2026 09:13
Re: [PATCH net-next v3] net: mctp: Make flow KUnit coverage an explicit opt-in
#2221
Author: Geert Uytterhoeven
Date: Mon, 12 Oct 2026 09:13
76 lines
10809 bytes
Hi Karl,

On Fri, 2 Oct 2026 at 23:21, Karl Mehltretter <kmehltretter@gmail.com> wrote:
> MCTP_TEST selects MCTP_FLOWS, so KUNIT_ALL_TESTS builds flow support and
> SKB_EXTENSIONS even when no transport needs them. KUnit's style guide
> says tests should not select otherwise unused functionality. The CRC
> and crypto library tests use explicit ENABLE_ALL_FOR_KUNIT options for
> full coverage.
>
> Remove the selection from MCTP_TEST. The core suite remains available
> without flows; its two flow cases use their existing skip paths. Add
> MCTP_ENABLE_ALL_FOR_KUNIT to opt into full coverage, and enable it in
> all_tests.config and a dedicated net/mctp/.kunitconfig. Both profiles
> run the flow cases without a hardware transport.
>
> A plain MCTP_TEST=y configuration without the opt-in now skips those
> two cases. This is the coverage cost of leaving otherwise unused flow
> support disabled.
>
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
> Changes in v3:
> - Keep the core suite available without MCTP_FLOWS; a plain MCTP_TEST=y
>   configuration now skips only the two flow cases.
> - Add MCTP_ENABLE_ALL_FOR_KUNIT to retain full coverage in
>   all_tests.config and a focused net/mctp/.kunitconfig.
> - Drop the Fixes tag because this changes test configuration rather
>   than fixing a runtime MCTP bug.

Thanks for the update!

> --- a/net/mctp/Kconfig
> +++ b/net/mctp/Kconfig
> @@ -12,9 +12,23 @@ menuconfig MCTP
>           devices, you'll want to enable a driver for a specific hardware
>           channel.
>
> +config MCTP_ENABLE_ALL_FOR_KUNIT
> +       bool "Enable all optional MCTP features for KUnit tests"
> +       depends on MCTP=y && KUNIT=y
> +       select MCTP_FLOWS
> +       help
> +         Enable all optional MCTP features covered by KUnit tests, even
> +         when no transport needs them. Currently this selects MCTP_FLOWS
> +         so the two flow cases can run.
> +
> +         Without this option, the core suite remains available; the flow
> +         cases skip unless a transport enables flow support.
> +
> +         You still need to enable MCTP_TEST, either individually or through
> +         KUNIT_ALL_TESTS.

IMHO adding yet another symbol overcomplicates things.
Why not make MCTP_FLOWS visible if KUNIT is enabled instead, like is
already done for several other symbols ('git grep " if KUNIT"')?

> +
>  config MCTP_TEST
>          bool "MCTP core tests" if !KUNIT_ALL_TESTS
> -        select MCTP_FLOWS
>          depends on MCTP=y && KUNIT=y
>          default KUNIT_ALL_TESTS
>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads