From: Cyril Hrubis <chrubis@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] tst_sys_conf.c: Report TCONF if read path trigger error such as EOPNOTSUPP
Date: Wed, 3 Sep 2025 10:43:40 +0200 [thread overview]
Message-ID: <aLf_vLC4FV3HjZHp@yuki.lan> (raw)
In-Reply-To: <20250902135117.6222-1-wegao@suse.com>
Hi!
> 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;
This is wrong for two reasons:
We have to make sure to use the correct flag here. I suppose that we can
treat the EOPNOTSUPP the same as the file to be missing. So we would
change the outcome based on the TST_SR_*_MISSING flags.
All errnos but EOPNOTSUPP should be treated as a TBROK as they were
before.
> + tst_brk(ttype | TERRNO, "Failed to read anything from '%s'",
> conf->path);
> }
>
> --
> 2.51.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-09-03 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 13:51 [LTP] [PATCH v1] tst_sys_conf.c: Report TCONF if read path trigger error such as EOPNOTSUPP Wei Gao via ltp
2025-09-03 8:43 ` Cyril Hrubis [this message]
2025-09-03 10:01 ` Martin Doucha
2025-09-04 1:58 ` [LTP] [PATCH v2 0/2] tst_test.c: Add hugepage check in prepare_and_mount_hugetlb_fs Wei Gao via ltp
2025-09-04 1:58 ` [LTP] [PATCH v2 1/2] " Wei Gao via ltp
2025-09-04 1:58 ` [LTP] [PATCH v2 2/2] cpuset02.c: Remove unnecessary .save_restore setting Wei Gao via ltp
2025-09-10 11:15 ` [LTP] [PATCH v2 0/2] tst_test.c: Add hugepage check in prepare_and_mount_hugetlb_fs Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aLf_vLC4FV3HjZHp@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.