From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: tst_kconfig: Add runtime checks
Date: Fri, 27 Mar 2026 12:06:47 +0100 [thread overview]
Message-ID: <acZkx8nI77zUx3go@yuki.lan> (raw)
In-Reply-To: <acYrmGE0yu07rJsn@redhat.com>
Hi!
> It would be great to have a description for the feature:
>
> Something maybe like:
>
> "Currently, LTP Kconfig parsing logic only checks if a feature was
> enabled during kernel compilation (e.g., CONFIG_USER_NS=y). However,
> some kernel features can be compiled in but disabled at runtime via
> kernel command-line parameter or sysctls. When this happens, tests
> relying on these Kconfig variables attempt to run and fail, rather
> than being gracefully skipped.
>
> This patch introduces a runtime check mechanism for Kconfig variables.
> When a monitored CONFIG_* variable is parsed as 'y' or 'm', the framework
> now executes an associated runtime check function. If the runtime check
> fails, the framework logs an info message and internally overrides the
> variable's state to 'n'. This allows the existing LTP dependency logic
> to properly skip tests that require the disabled feature."
Ah, sorry I've fixed the code but kept the description single line, I
will fix that.
> Also, add test_kconfig04.c in newlib_tests/ to verify this works?
I've added a new config variable to newlib_tests/test_kconfig.c (it does
not show in the output unless you boot with namespaces disabled).
If you do and run it:
$ ./test_kconfig
tst_kconfig.c:90: TINFO: Parsing kernel config '/lib/modules/6.16.0/build/.config'
tst_kconfig.c:138: TINFO: CONFIG_USER_NS=y present but disabled at runtime
...
tst_kconfig.c:566: TINFO: Constraint 'CONFIG_USER_NS' not satisfied!
tst_kconfig.c:512: TINFO: Variables:
tst_kconfig.c:530: TINFO: CONFIG_USER_NS=n
tst_test.c:1461: TCONF: Aborting due to unsuitable kernel config, see above!
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-03-27 11:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 14:40 [LTP] [PATCH] lib: tst_kconfig: Add runtime checks Cyril Hrubis
2026-03-26 15:15 ` Petr Vorel
2026-03-27 7:02 ` Li Wang via ltp
2026-03-27 11:06 ` Cyril Hrubis [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-02-05 13:57 Cyril Hrubis
2026-02-05 17:47 ` Petr Vorel
2026-02-06 7:58 ` Li Wang via ltp
2026-02-06 8:23 ` Petr Vorel
2026-02-06 12:23 ` Li Wang via ltp
2026-03-26 14:09 ` Cyril Hrubis
2026-03-26 14:16 ` Cyril Hrubis
2026-03-26 16:39 ` Petr Vorel
2026-02-06 8:23 ` Petr Vorel
2026-02-06 8:33 ` Cyril Hrubis
2026-02-06 9:31 ` Petr Vorel
2026-02-06 9:37 ` Petr Vorel
2026-02-06 9:45 ` Cyril Hrubis
2026-02-06 10:31 ` Petr Vorel
2026-03-26 14:38 ` Cyril Hrubis
2026-03-26 15:44 ` Petr Vorel
2026-03-11 8:59 ` Petr Vorel
2026-03-24 8:33 ` Andrea Cervesato via ltp
2026-03-26 14:17 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acZkx8nI77zUx3go@yuki.lan \
--to=chrubis@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox