[LTP] [PATCH] safe_keyctl: Skip with TCONF on EOPNOTSUPP

simplemessager
2025-12-09T12:30:34Z

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>
---
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,
"keyctl(%d, %lu, %lu, %lu, %lu)",
cmd, arg2, arg3, arg4, arg5);
}
--
2.47.2