[LTP] [PATCH v1] tst_sys_conf.c: Report TCONF if read path trigger error such as EOPNOTSUPP

Wei Gao wegao@suse.com
Tue Sep 2 15:51:13 CEST 2025


We encounter EOPNOTSUPP error when read path in old sle power test env, the reason is
hugepages are disabled. Detail error information such as:
TEST cpuset02:
tst_sys_conf.c:103: TBROK: Failed to read anything from '/proc/sys/vm/nr_hugepages': EOPNOTSUPP (95)

Signed-off-by: Wei Gao <wegao@suse.com>
---
 lib/tst_sys_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/tst_sys_conf.c b/lib/tst_sys_conf.c
index 80cd83569..30b0b67a8 100644
--- a/lib/tst_sys_conf.c
+++ b/lib/tst_sys_conf.c
@@ -99,7 +99,8 @@ int tst_sys_conf_save(const struct tst_path_val *conf)
 		if (conf->flags & TST_SR_IGNORE_ERR)
 			return 1;
 
-		tst_brk(TBROK | TERRNO, "Failed to read anything from '%s'",
+		ttype = conf->flags ? TBROK : TCONF;
+		tst_brk(ttype | TERRNO, "Failed to read anything from '%s'",
 			conf->path);
 	}
 
-- 
2.51.0



More information about the ltp mailing list