[Devel] [PATCH hci-8.1 v2 0/6] configs: a User Mode Linux kernel for the KUnit tests
Eva Kurchatova (Virtuozzo)
eva.kurchatova at virtuozzo.com
Tue Oct 27 02:26:01 MSK 2026
On 10/27/26 00:34, Konstantin Khorenko wrote:
> Several KUnit tests can only be built into the kernel image, and the
> shipped kernel builds its tests as modules, so nothing runs them. The
> series adds a "um" config variant: a User Mode Linux kernel with every
> KUnit test built in, under KASAN and UBSAN. kernel.spec builds it with
> ARCH=um, kernel-selftests-internal ships it, and the hci-kunit test runs
> it.
>
> The variant inherits the generic and generic-x86 layers, so the tests
> meet the options of the shipped x86_64 kernel, vz ones included. What
> differs lives in custom-overrides/generic/um, one file per option as
> for the other variants, and passes process_configs.sh -n -w -c.
>
> - 1/6: the um variant, with the reason for each option turned off
> - 2/6: KASAN_KUNIT_TEST keeps its prompt under KUNIT_ALL_TESTS, so
> that the um config can leave it out
> - 3/6: KASAN, without its self-test
> - 4/6: no debug info, which kernel.spec would throw away anyway
> - 5/6: the subsystems we ship as modules only go off, so that no KUnit
> test is left a module
> - 6/6: a check of the resolved config at build time
>
> Outside this series:
>
> - vzkernel.vzspecs: "kernel.spec: build the User Mode Linux KUnit
> kernel" builds, checks and packages it from kernel-um-rhel.config
> - git-publish.sh brings kernel-um-rhel.config to vzkernel.vzspecs
> along with the x86_64 configs
> - hci-tests PR #9241 (hci-kunit) runs it; a follow-up boots it with
> kasan_multi_shot
>
> The overrides and their reasons come from Eva Kurchatova's
> kunit-uml-config.sh approach in vzkernel.vzspecs, which derived the
> config at build time. This series moves the config into the kernel
> tree.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-143636
> https://virtuozzo.atlassian.net/browse/VSTOR-148112
>
> Assisted-by: LLM
> Signed-off-by: Konstantin Khorenko<khorenko at virtuozzo.com>
>
> ---
> Changes in v2:
> - 1/6: drop the stale NO_IOMEM override
> - 3/6: turn SLUB_RCU_DEBUG on (Eva)
> - 5/6: new, turn off the subsystems we ship as modules only, which kept
> their KUnit tests modules: CFG80211, DRM_XE, DRM_VKMS, HID_UCLOGIC,
> HSR, RPCSEC_GSS_KRB5 and NFSD
> - 6/6: new, check_um_config.sh fails the build when the real compiler
> drops an option the um layer sets, or a KUnit test is left a module
> (Eva)
> - Link to v1:http://lore.virtuozzo.com/20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-0-b7e76e985a6b@virtuozzo.com
>
Tested on 0a88195dfe7a (branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz): the
um config resolves with KASAN and SLUB_RCU_DEBUG on, the KASAN test and
the module-only subsystems off, and no KUnit test left a module.
Built with ARCH=um and booted with kasan_multi_shot: 183 pass, 0 fail.
When I take CONFIG_KASAN out of the resolved config, or try to turn
KUnit tests into modules, check_um_config.sh fails, naming the option.
The Kconfig scan finds the same 110 tests I counted via grep.
Remaining notes:
build_configs.sh turns WERROR on in every config when ENABLE_WERROR is
set, the default of the dist-* targets in Makefile.variables, so a "make
dist-rhel-configs" writes CONFIG_WERROR=y into the um config too, and
the check then fails the build ("CONFIG_WERROR=y: set, the um layer has
it off"). The published x86_64 configs have WERROR off, so I can't
imagine this will affect CI; if it does run with it though,
build_configs.sh should leave the um variant out.
Updated
https://bitbucket.org/virtuozzocore/hci-tests.vhistrg/pull-requests/9241
with follow-ups: Pass kasan_multi_shot, handle printk timestamp, removed
KASAN report filter.
Reviewed-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/devel/attachments/20261027/0ccec8fe/attachment.html>
More information about the Devel
mailing list