[LTP] [v2 2/2] lib/tst_pid.c: Increase PIDS_RESERVED to avoid fork failure.

Petr Vorel pvorel@suse.cz
Tue Feb 14 14:37:14 CET 2023


Hi Leo,

> After Adjusting how we count used pid, we increase
> the number of PIDS_RESERVED to void fork failure.
nit: in this case I'd actually keep changes in single commit
(otherwise first commit alone would break tests),

Kind regards,
Petr

> Suggested-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes v1 -> v2
> * Split into two patches
> ---
>  lib/tst_pid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/lib/tst_pid.c b/lib/tst_pid.c
> index a282f8cc9..7582e4828 100644
> --- a/lib/tst_pid.c
> +++ b/lib/tst_pid.c
> @@ -36,7 +36,7 @@
>  #define CGROUPS_V1_SLICE_FMT "/sys/fs/cgroup/pids/user.slice/user-%d.slice/pids.max"
>  #define CGROUPS_V2_SLICE_FMT "/sys/fs/cgroup/user.slice/user-%d.slice/pids.max"
>  /* Leave some available processes for the OS */
> -#define PIDS_RESERVE 50
> +#define PIDS_RESERVE 200

>  pid_t tst_get_unused_pid_(void (*cleanup_fn) (void))
>  {


More information about the ltp mailing list