Re: [PATCH] kbuild: sort the config fragments in kselftest-merge
From: Nicolas Schier
Date: Fri Dec 04 2026 - 13:34:09 EST
On Thu, Dec 03, 2026 at 01:48:37PM -0500, Sasha Levin wrote:
> kselftest-merge passes the selftest config fragments to merge_config.sh
> in the order find(1) returns them, which is the directory order of the
> filesystem. Where two fragments select different members of a choice,
> the result depends on which of them is merged last, so the same tree can
> give different configurations on different machines.
>
> Two choices are affected today:
>
> - bpf/config.aarch64 and bpf/config.s390x select HZ_100, while
> net/packetdrill/config selects HZ_1000;
> - bpf/config, exec/config and ftrace/config select DEBUG_INFO_DWARF4,
> while vsock/config selects DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT.
>
> KernelCI builds its selftest kernels with this target. Its arm64 builds
> of v7.4-rc5-100-g0810bd27d7bb and v7.4-rc5-103-gd06ce6f1eb5e merged the
> fragments in different orders, and the two configurations differ only in
> the timer frequency: HZ is 100 in the first and 1000 in the second.
>
> Sort the list. The Makefile sets LC_COLLATE=C, so the order is the same
> everywhere. The shell glob that find replaced was sorted as well.
>
> Fixes: 6d3db46c8e33 ("kbuild: teach kselftest-merge to find nested config files")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
Thanks!
Reviewed-by: Nicolas Schier <n.schier@xxxxxxxxx>
--
Nicolas