<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">On 10/27/26 00:34, Konstantin Khorenko
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20261026-b4-prep-khorenko-vstor-143636-uml-config-v2-0-76c8329592af@virtuozzo.com">
<pre wrap="" class="moz-quote-pre">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.
<a class="moz-txt-link-freetext" href="https://virtuozzo.atlassian.net/browse/VSTOR-143636">https://virtuozzo.atlassian.net/browse/VSTOR-143636</a>
<a class="moz-txt-link-freetext" href="https://virtuozzo.atlassian.net/browse/VSTOR-148112">https://virtuozzo.atlassian.net/browse/VSTOR-148112</a>
Assisted-by: LLM
Signed-off-by: Konstantin Khorenko <a class="moz-txt-link-rfc2396E" href="mailto:khorenko@virtuozzo.com"><khorenko@virtuozzo.com></a>
---
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: <a class="moz-txt-link-freetext" href="http://lore.virtuozzo.com/20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-0-b7e76e985a6b@virtuozzo.com">http://lore.virtuozzo.com/20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-0-b7e76e985a6b@virtuozzo.com</a>
</pre>
</blockquote>
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.<br>
<br>
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.<br>
<br>
Remaining notes:<br>
<br>
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.<br>
<br>
Updated
<a class="moz-txt-link-freetext" href="https://bitbucket.org/virtuozzocore/hci-tests.vhistrg/pull-requests/9241">https://bitbucket.org/virtuozzocore/hci-tests.vhistrg/pull-requests/9241</a>
with follow-ups: Pass kasan_multi_shot, handle printk timestamp,
removed KASAN report filter.<br>
<br>
Reviewed-by: Eva Kurchatova <a class="moz-txt-link-rfc2396E" href="mailto:eva.kurchatova@virtuozzo.com"><eva.kurchatova@virtuozzo.com></a><br>
Signed-off-by: Eva Kurchatova <a class="moz-txt-link-rfc2396E" href="mailto:eva.kurchatova@virtuozzo.com"><eva.kurchatova@virtuozzo.com></a>
</body>
</html>