[LTP] [PATCH 1/1] keyctl30: Check module is presented before loading
Petr Vorel
pvorel@suse.cz
Tue Sep 22 12:58:40 CEST 2026
This fixes test on the system without module:
modprobe: FATAL: Module pkcs8_key_parser not found in directory /usr/lib/modules/6.12.0-160100.5-azure
tst_cmd.c:112: TBROK: 'modprobe' exited with a non-zero code 1 at tst_cmd.c:112
With the fix it TCONF as expected:
tst_module.c:72: TCONF: Failed to find module 'pkcs8_key_parser'
Fixes: 1bb448ed9e ("keyctl30: Test KEYCTL_PKEY_QUERY on private key")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
FYI Cyril suggested to add into struct config_module_map:
{"CONFIG_NET_SCH_INGRESS", "sch_ingress"},
{"CONFIG_NET_CLS_MATCHALL", "cls_matchall"},
{"CONFIG_NET_ACT_PEDIT", "act_pedit"},
+ {"CONFIG_PKCS8_PRIVATE_KEY_PARSER", "pcks8_key_parser"},
Although it does not harm this is IMHO just wrong function being used.
testcases/kernel/syscalls/keyctl/keyctl30.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/keyctl/keyctl30.c b/testcases/kernel/syscalls/keyctl/keyctl30.c
index ef51bba338..5f98d2a7d4 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl30.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl30.c
@@ -29,7 +29,7 @@ static void setup(void)
{
SAFE_KEYCTL(KEYCTL_JOIN_SESSION_KEYRING, 0, 0, 0, 0);
- tst_modprobe("pkcs8_key_parser", NULL);
+ tst_module_load("pkcs8_key_parser", NULL);
priv_key = add_asymmetric_key_or_tconf("priv", rsa2048_pkcs8,
sizeof(rsa2048_pkcs8),
--
2.55.0
More information about the ltp
mailing list