[LTP] [PATCH 1/1] safe_keyctl: Skip with TCONF on EOPNOTSUPP
Petr Vorel
pvorel@suse.cz
Fri Dec 12 16:21:54 CET 2025
> From: Petr Vorel <pvorel@suse.cz>
> errno EOPNOTSUPP is likely a configuration issue, skip testing
> with TCONF.
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Mingyu Li <limy83@chinatelecom.cn>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---
> include/lapi/keyctl.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
> index e08b8f132..eac9e2609 100644
> --- a/include/lapi/keyctl.h
> +++ b/include/lapi/keyctl.h
> @@ -212,7 +212,8 @@ static inline long safe_keyctl(const char *file, const int lineno,
> rval = keyctl(cmd, arg2, arg3, arg4, arg5);
> if (rval == -1) {
> - tst_brk_(file, lineno, TBROK | TERRNO,
> + tst_brk_(file, lineno,
> + errno == EOPNOTSUPP ? TCONF : TBROK | TERRNO,
In the end, thinking about it twice I merged version which always prints TERRNO,
because we don't have any special explanation for TCONF, therefore the only
explanation is the errno itself:
(errno == EOPNOTSUPP ? TCONF : TBROK) | TERRNO,
Merged, with your Reviewed-by: and Co-developed-by:. Thanks!
Kind regards,
Petr
> "keyctl(%d, %lu, %lu, %lu, %lu)",
> cmd, arg2, arg3, arg4, arg5);
> }
More information about the ltp
mailing list