From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: Martin Doucha <martin.doucha@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v15 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path
Date: Tue, 22 Sep 2026 12:02:20 +0200 [thread overview]
Message-ID: <20260922100220.GA2170537@pevik> (raw)
In-Reply-To: <20260919015329.22042-2-wegao@suse.com>
Hi all,
> tst_get_free_gid_() prints the found GID when it succeeds, but it
> incorrectly includes TERRNO in tst_res_(). This prints whatever value
> happens to be in errno (often 0 or a stale value) which is confusing in
> a success path.
> Remove the spurious TERRNO flag from the tst_res_() success message.
> Signed-off-by: Wei Gao <wegao@suse.com>
> Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Martin might done it intentionally (had a reason for printing it).
If not, I'd merge this simple improvement before the release.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Fixes: 68f0a7fedf ("Add verbose setup to creat08, creat09 and open10")
Kind regards,
Petr
> ---
> lib/tst_uid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/lib/tst_uid.c b/lib/tst_uid.c
> index af4ef8cf7..b0b087362 100644
> --- a/lib/tst_uid.c
> +++ b/lib/tst_uid.c
> @@ -24,7 +24,7 @@ gid_t tst_get_free_gid_(const char *file, const int lineno, gid_t skip)
> continue;
> if (errno == 0 || errno == ENOENT || errno == ESRCH) {
> - tst_res_(file, lineno, TINFO | TERRNO,
> + tst_res_(file, lineno, TINFO,
> "Found unused GID %d", (int)ret);
> return ret;
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-09-22 10:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 1:53 [LTP] [PATCH v15 0/3] open16: allow restricted O_CREAT of FIFOs and regular files Wei Gao via ltp
2026-09-19 1:53 ` [LTP] [PATCH v15 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path Wei Gao via ltp
2026-09-19 5:52 ` [LTP] " linuxtestproject.agent
2026-09-22 10:02 ` Petr Vorel [this message]
2026-10-08 8:41 ` [LTP] [PATCH v15 1/3] " Martin Doucha
2026-09-19 1:53 ` [LTP] [PATCH v15 2/3] lib: New library function tst_get_free_uid Wei Gao via ltp
2026-09-19 1:53 ` [LTP] [PATCH v15 3/3] open16: allow restricted O_CREAT of FIFOs and regular files Wei Gao via ltp
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=20260922100220.GA2170537@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
--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.