From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Jinseok Kim" <always.starving0@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] syscalls: consolidate getpid02 into getppid02
Date: Thu, 30 Jul 2026 08:10:44 +0000 [thread overview]
Message-ID: <6a6b0705.9e856a68.2ba196.adb5@mx.google.com> (raw)
In-Reply-To: <20260729120820.5646-1-always.starving0@gmail.com>
Hi Jinseok,
> +
> if (pid == 0) {
> pproc_id = getppid();
>
> - if (pproc_id != proc_id)
> - tst_res(TFAIL, "child's ppid(%d) not equal to parent's pid(%d)",
> + if (pproc_id != proc_id) {
> + tst_res(TFAIL, "child getppid() (%d) != parent getpid() (%d)",
> pproc_id, proc_id);
> - else
> - tst_res(TPASS, "getppid() returned parent pid (%d)", proc_id);
> + } else {
> + tst_res(TPASS, "child getppid() == parent getpid() (%d)", proc_id);
> + }
You can use TST_EXP_EQ_LI.
> +
> + *child_pid = getpid();
> +
> + return;
> }
> +
> + tst_reap_children();
> +
> + if (*child_pid != pid)
> + tst_res(TFAIL, "child getpid() (%d) != parent fork() (%d)", *child_pid, pid);
> + else
> + tst_res(TPASS, "child getpid() == parent fork() (%d)", pid);
> +}
Here as well.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-07-30 8:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 12:08 [LTP] [PATCH v2] syscalls: consolidate getpid02 into getppid02 Jinseok Kim
2026-07-30 8:10 ` Andrea Cervesato via ltp [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=6a6b0705.9e856a68.2ba196.adb5@mx.google.com \
--to=ltp@lists.linux.it \
--cc=always.starving0@gmail.com \
--cc=andrea.cervesato@suse.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