From: linuxtestproject.agent@gmail.com
To: Li Wang <li.wang@linux.dev>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] lib: add module is loaded check
Date: Wed, 25 Nov 2026 10:43:57 +0000 [thread overview]
Message-ID: <20261125104357.4174-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261125030529.907385-2-li.wang@linux.dev>
Hi Li,
On Wed Nov 25 11:05:26 2026 +0800, Li Wang (Hieco) <li.wang@linux.dev> wrote:
> lib: add module is loaded check
--- [PATCH 2/4] ---
> diff --git a/lib/tst_kconfig.c b/lib/tst_kconfig.c
> index f055c2e5f..8b4d0e2ef 100644
> --- a/lib/tst_kconfig.c
> +++ b/lib/tst_kconfig.c
> @@ -178,6 +186,12 @@ static void kconfig_module_check(struct tst_kconfig_var *var)
> if (strcmp(config_module_maps[i].config, var->id))
> continue;
>
> + if (strchr(config_module_maps[i].module_name, '-')) {
> + tst_brk(TBROK, "config_module_maps[]: module '%s' "
> + "must use '_' instead of '-'",
> + config_module_maps[i].module_name);
> + }
config_module_maps[] still contains {"CONFIG_CAN_RAW", "can-raw"} and
{"CONFIG_CAN_BCM", "can-bcm"} with hyphens. When either option is set to =m,
tests listing CONFIG_CAN_RAW or CONFIG_CAN_BCM in .needs_kconfigs (such as
can_filter, can_rcv_own_msgs, and can_bcm01) will now abort with TBROK here.
Update those two entries in config_module_maps[] to "can_raw" and "can_bcm".
--- [PATCH 4/4] ---
> diff --git a/testcases/cve/sctphantom.c b/testcases/cve/sctphantom.c
> index 83834b848..bdbe40286 100644
> --- a/testcases/cve/sctphantom.c
> +++ b/testcases/cve/sctphantom.c
> @@ -205,8 +204,6 @@ static void setup(void)
> };
> const struct tst_path_val *sysctl;
>
> - tst_modprobe("sctp", NULL);
> -
> for (sysctl = sysctls; sysctl->path; sysctl++)
> tst_sys_conf_save(sysctl);
Now that the sctp module is loaded in do_setup() before .save_restore is
processed, move sysctls[] to .save_restore in struct tst_test; calling
tst_sys_conf_save() inside setup() runs in the forked test child process, so
do_cleanup() in the library process never restores those sysctls if sctp was
already loaded. Also update the top-level doc comment in sctphantom.c, which
still instructs the user to run "modprobe sctp" first.
> diff --git a/testcases/kernel/syscalls/keyctl/keyctl23.c b/testcases/kernel/syscalls/keyctl/keyctl23.c
> index cf90210d2..adfb1197a 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl23.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl23.c
> @@ -6,7 +6,8 @@
> /*\
> * Test ``KEYCTL_RESTRICT_KEYRING`` builtin_trusted of :manpage:`keyctl(2)`.
> *
> - * Requires root (CAP_SYS_MODULE) to load the ``x509_key_parser`` module.
> + * Requires root (CAP_SYS_MODULE) so that the test library can load the
> + * ``x509_key_parser`` module.
> *
> * [Algorithm]
> *
> @@ -16,7 +17,6 @@
> */
>
> #include "keyctl_common.h"
> -#include "tst_module.h"
>
> #define PAYLOAD "payload"
>
> @@ -89,8 +89,6 @@ static void setup(void)
> {
> SAFE_KEYCTL(KEYCTL_JOIN_SESSION_KEYRING, 0, 0, 0, 0);
>
> - tst_modprobe("x509_key_parser", NULL);
> -
> ring_builtin = SAFE_NEW_RING("ltpkeyctl23_builtin");
keyctl23.c sets "CONFIG_X509_CERTIFICATE_PARSER=y" in .needs_kconfigs, which
rejects CONFIG_X509_CERTIFICATE_PARSER=m with TCONF before
tst_kconfig_module_load() is reached. Change the entry in .needs_kconfigs to
"CONFIG_X509_CERTIFICATE_PARSER" so modular x509_key_parser is accepted and
loaded, or drop .needs_root = 1 and the x509_key_parser module comment if =y
is required.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-11-25 10:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 3:05 [LTP] [PATCH v8 0/4] tst_kconfig: automatic module load/unload for CONFIG_*=m Li Wang (Hieco)
2026-11-25 3:05 ` [LTP] [PATCH v8 1/4] lib: add module is loaded check Li Wang (Hieco)
2026-11-25 10:34 ` Cyril Hrubis
2026-11-25 10:43 ` linuxtestproject.agent [this message]
2026-11-25 3:05 ` [LTP] [PATCH v8 2/4] tst_kconfig: load and unload kernel modules for CONFIG_*=m Li Wang (Hieco)
2026-11-25 10:48 ` Cyril Hrubis
2026-11-26 3:12 ` Li Wang
2026-11-25 3:05 ` [LTP] [PATCH v8 3/4] tst_kconfig: add module mappings for vsock/vsock_loopback Li Wang (Hieco)
2026-11-25 10:53 ` Cyril Hrubis
2026-11-26 3:58 ` Li Wang
2026-11-25 3:05 ` [LTP] [PATCH v8 4/4] testcases: drop manual tst_modprobe() now handled by tst_kconfig Li Wang (Hieco)
2026-11-25 11:00 ` Cyril Hrubis
-- strict thread matches above, loose matches on Subject: below --
2026-11-03 7:57 [LTP] [PATCH v7 1/4] lib: add module is loaded check Li Wang (Hieco)
2026-11-03 10:19 ` [LTP] " linuxtestproject.agent
2026-11-02 2:43 [LTP] [PATCH v6 1/4] " Li Wang (Hieco)
2026-11-02 8:26 ` [LTP] " linuxtestproject.agent
2026-10-15 7:58 [LTP] [PATCH v5 1/4] " Li Wang
2026-10-15 9:01 ` [LTP] " linuxtestproject.agent
2026-10-14 6:11 [LTP] [PATCH v4 1/4] " Li Wang
2026-10-14 7:41 ` [LTP] " linuxtestproject.agent
2026-10-10 3:36 [LTP] [PATCH v3 1/4] " Li Wang
2026-10-10 9:38 ` [LTP] " linuxtestproject.agent
2026-10-08 5:21 [LTP] [Patch v2 1/4] " Li Wang
2026-10-08 10:14 ` [LTP] " linuxtestproject.agent
2026-10-10 1:43 ` Li Wang
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=20261125104357.4174-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=li.wang@linux.dev \
--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