All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v13 0/3] open16: allow restricted O_CREAT of FIFOs and regular files
@ 2026-08-31  1:59 Wei Gao via ltp
  2026-08-31  1:59 ` [LTP] [PATCH v13 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path Wei Gao via ltp
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Wei Gao via ltp @ 2026-08-31  1:59 UTC (permalink / raw)
  To: ltp

v12->v13:
- remove unrelated comments
- remove SAFE_WAITPID

Wei Gao (3):
  lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path
  lib: New library function tst_get_free_uid
  open16: allow restricted O_CREAT of FIFOs and regular files

 include/tst_uid.h                         |  14 +++
 lib/tst_uid.c                             |  30 ++++-
 runtest/syscalls                          |   1 +
 testcases/kernel/syscalls/open/.gitignore |   1 +
 testcases/kernel/syscalls/open/open16.c   | 133 ++++++++++++++++++++++
 5 files changed, 178 insertions(+), 1 deletion(-)
 create mode 100644 testcases/kernel/syscalls/open/open16.c

-- 
2.55.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [LTP] [PATCH v12 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path
@ 2026-07-22  4:47 Wei Gao via ltp
  2026-07-22  5:59 ` [LTP] " linuxtestproject.agent
  0 siblings, 1 reply; 9+ messages in thread
From: Wei Gao via ltp @ 2026-07-22  4:47 UTC (permalink / raw)
  To: ltp

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>
---
 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;
 		}
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-04 10:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31  1:59 [LTP] [PATCH v13 0/3] open16: allow restricted O_CREAT of FIFOs and regular files Wei Gao via ltp
2026-08-31  1:59 ` [LTP] [PATCH v13 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path Wei Gao via ltp
2026-08-31  3:53   ` [LTP] " linuxtestproject.agent
2026-09-04 10:37   ` [LTP] [PATCH v13 1/3] " Andrea Cervesato via ltp
2026-08-31  1:59 ` [LTP] [PATCH v13 2/3] lib: New library function tst_get_free_uid Wei Gao via ltp
2026-09-04 10:39   ` Andrea Cervesato via ltp
2026-08-31  1:59 ` [LTP] [PATCH v13 3/3] open16: allow restricted O_CREAT of FIFOs and regular files Wei Gao via ltp
2026-09-04 10:37   ` Andrea Cervesato via ltp
  -- strict thread matches above, loose matches on Subject: below --
2026-07-22  4:47 [LTP] [PATCH v12 1/3] lib/tst_uid: Remove spurious TERRNO from tst_get_free_gid success path Wei Gao via ltp
2026-07-22  5:59 ` [LTP] " linuxtestproject.agent

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.