public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] getpgid01: On Android, pgid(1) is 0 instead of 1
@ 2023-10-02 18:35 Edward Liaw via ltp
  2023-10-26 10:05 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Liaw via ltp @ 2023-10-02 18:35 UTC (permalink / raw)
  To: ltp; +Cc: kernel-team

From: Edward Liaw via ltp <ltp@lists.linux.it>

Android's init does not call setpgid(0, 0) so it does not have pgid=1.
0 is functionally equivalent, since pgid 0 means the pgid is the same as
the process pid.

Signed-off-by: Edward Liaw <edliaw@google.com>
---
 testcases/kernel/syscalls/getpgid/getpgid01.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/syscalls/getpgid/getpgid01.c b/testcases/kernel/syscalls/getpgid/getpgid01.c
index 479fe5dcb..5523101e7 100644
--- a/testcases/kernel/syscalls/getpgid/getpgid01.c
+++ b/testcases/kernel/syscalls/getpgid/getpgid01.c
@@ -37,7 +37,11 @@ static void run(void)
 		TST_EXP_EQ_LI(TST_RET, pgid);
 
 		TST_EXP_PID(getpgid(1));
+#ifndef __ANDROID__
 		TST_EXP_EQ_LI(TST_RET, 1);
+#else
+		TST_EXP_EQ_LI(TST_RET, 0);
+#endif
 	}
 
 	tst_reap_children();
-- 
2.42.0.582.g8ccd20d70d-goog


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

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

end of thread, other threads:[~2023-10-26 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 18:35 [LTP] [PATCH v2] getpgid01: On Android, pgid(1) is 0 instead of 1 Edward Liaw via ltp
2023-10-26 10:05 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox