public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Teo Couprie Diaz <teo.coupriediaz@arm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] ipc/msgstress03: Assume all forks will run concurently
Date: Tue, 28 Feb 2023 14:21:49 +0000	[thread overview]
Message-ID: <87bklduaxs.fsf@suse.de> (raw)
In-Reply-To: <20230215145440.78482-4-teo.coupriediaz@arm.com>

Hello,

Teo Couprie Diaz <teo.coupriediaz@arm.com> writes:

> It appears that msgstress03 doesn't account for all PIDs that its children
> can use, as it expects the tasks will terminate quickly and not reach
> the PID limit.
> On some systems, this assumption can be invalid and the PID limit
> will be hit.
> Change the limit to account for all possible children at once, knowning
> that each child will fork as well.

Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>

>
> Signed-off-by: Teo Couprie Diaz <teo.coupriediaz@arm.com>
> ---
>  testcases/kernel/syscalls/ipc/msgstress/msgstress03.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c
> index 3cb70ab18..0c46927b8 100644
> --- a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c
> +++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c
> @@ -109,7 +109,7 @@ int main(int argc, char **argv)
>  		}
>  	}
>  
> -	free_pids = tst_get_free_pids(cleanup);
> +	free_pids = tst_get_free_pids(cleanup) / 2;
>  	if (nprocs >= free_pids) {
>  		tst_resm(TINFO,
>  			 "Requested number of processes higher than limit (%d > %d), "
> -- 
> 2.25.1


-- 
Thank you,
Richard.

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

      reply	other threads:[~2023-02-28 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 14:54 [LTP] [PATCH 0/3] lib/tst_pid: Find session PID limit more reliably Teo Couprie Diaz
2023-02-15 14:54 ` [LTP] [PATCH 1/3] lib/tst_pid: Find cgroup pid.max programmatically Teo Couprie Diaz
2023-02-28 13:50   ` Richard Palethorpe
2023-03-01 10:19     ` Teo Couprie Diaz
2023-02-15 14:54 ` [LTP] [PATCH 2/3] lib/tst_pid: Go to parent cgroups for max value Teo Couprie Diaz
2023-02-28 14:07   ` Richard Palethorpe
2023-03-01 10:33     ` Teo Couprie Diaz
2023-03-02  8:17       ` Richard Palethorpe
2023-02-15 14:54 ` [LTP] [PATCH 3/3] ipc/msgstress03: Assume all forks will run concurently Teo Couprie Diaz
2023-02-28 14:21   ` Richard Palethorpe [this message]

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=87bklduaxs.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=ltp@lists.linux.it \
    --cc=teo.coupriediaz@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox