public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: Edward Liaw <edliaw@google.com>
Cc: kernel-team@android.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] setpgid02: use 1 instead of getpgid(1)
Date: Fri, 31 Mar 2023 12:15:07 +0530	[thread overview]
Message-ID: <12180793.O9o76ZdvQC@localhost> (raw)
In-Reply-To: <20230331000747.2294390-1-edliaw@google.com>

Hi Edward,

On Friday, March 31, 2023 5:37:47 AM IST Edward Liaw via ltp wrote:
> On Android, init does not setpgid, so getpgid(1) returns 0 and the third
> case of setting pgid to a different session's process group does not
> behave as expected: setpgid treats 0 as setting the pgid to the pid.
> 
> Instead, replace SAFE_GETPGID(1) with the expected value of 1.
> 
> Signed-off-by: Edward Liaw <edliaw@google.com>
> ---
>  testcases/kernel/syscalls/setpgid/setpgid02.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/syscalls/setpgid/setpgid02.c b/testcases/kernel/syscalls/setpgid/setpgid02.c
> index 4b63afee8..bf7b3176b 100644
> --- a/testcases/kernel/syscalls/setpgid/setpgid02.c
> +++ b/testcases/kernel/syscalls/setpgid/setpgid02.c
> @@ -44,7 +44,7 @@ static void setup(void)
>  	 * Getting pgid of init/systemd process to use it as a
>  	 * process group from a different session for EPERM test
>  	 */
> -	init_pgid = SAFE_GETPGID(1);
> +	init_pgid = 1;
>  }
>  
>  static void run(unsigned int n)
> 
This looks fine.
Reviewed-by: Avinesh Kumar <akumar@suse.de>

Regards,
Avinesh



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

  parent reply	other threads:[~2023-03-31  6:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  0:07 [LTP] [PATCH v2] setpgid02: use 1 instead of getpgid(1) Edward Liaw via ltp
2023-03-31  6:14 ` Petr Vorel
2023-03-31  6:45 ` Avinesh Kumar [this message]
2023-04-07 10:18 ` Teo Couprie Diaz
2023-04-10 23:51   ` Edward Liaw via ltp
2023-04-11 10:35     ` Teo Couprie Diaz
2023-04-11 23:05       ` Petr Vorel
2023-04-12 11:45         ` Teo Couprie Diaz
2023-06-28  9:16 ` Petr Vorel

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=12180793.O9o76ZdvQC@localhost \
    --to=akumar@suse.de \
    --cc=edliaw@google.com \
    --cc=kernel-team@android.com \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox