[LTP] [PATCH v3 1/3] syscalls/setgroups01: Convert to new API

Cyril Hrubis chrubis@suse.cz
Mon Aug 14 16:05:49 CEST 2023


Hi!
The original test used the getgroups syscall to get the list of groups
and its size. I've changed the code to match the behavior and pushed,
thanks.

Diff:
diff --git a/testcases/kernel/syscalls/setgroups/setgroups01.c b/testcases/kernel/syscalls/setgroups/setgroups01.c
index ca01997ae..9a5b77e93 100644
--- a/testcases/kernel/syscalls/setgroups/setgroups01.c
+++ b/testcases/kernel/syscalls/setgroups/setgroups01.c
@@ -27,7 +27,8 @@ static void verify_setgroups(void)
 
 static void setup(void)
 {
-       if (GETGROUPS(len, list) < 0)
+       len = GETGROUPS(NGROUPS, list);
+       if (len < 0)
                tst_brk(TBROK | TERRNO, "getgroups() Failed");
 }

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list