[LTP] [PATCH 1/2] syscalls/getppid01: Convert to the new API
Petr Vorel
pvorel@suse.cz
Tue Mar 16 17:43:54 CET 2021
Hi Ruan,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
You extended test: checking PID range, good.
> +/*\
> + * [DESCRIPTION]
> + *
> + * Test whether parent process id that getpid() returns is out of range.
> +\*/
nit: only */
...
> + SAFE_FILE_SCANF("/proc/sys/kernel/pid_max", "%d\n", &pid_max);
> + if (ppid > pid_max)
> + tst_res(TFAIL, "getppid() returned %d, out of range!", ppid);
> + else
> + tst_res(TPASS, "getppid() returned %d", ppid);
> }
Kind regards,
Petr
More information about the ltp
mailing list