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

Martin Doucha mdoucha@suse.cz
Wed Sep 3 12:01:06 CEST 2025


Hi,
I don't see any reason to make this change. You should remove the 
.save_restore in cpuset02 instead because it's pointless. You don't 
change the value in /proc/sys/vm/nr_hugepages as far as I can tell and 
the file doesn't need to be restored even if you did.

On 02. 09. 25 15:51, Wei Gao via ltp wrote:
> 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);
>   	}
>   


-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list