Skip to contentSkip to conversation

syscalls: consolidate getpid02 into getppid02

PATCH In review Jinseok Kim 3 participants 3 messages Aug 6 – Aug 13

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 syscalls: consolidate getpid02 into getppid02

Although named getpid02, the test verifies both getpid() and getppid() across fork(). Reuse its broader coverage in getppid02 and remove the duplicated getpid02 test.

While at it, rename proc_id to parent_pid for clarity and use TST_EXP_EQ_LI() for PID comparisons.

---
Changes in v3:
- Rename proc_id to parent_pid for clarity.
- Use TST_EXP_EQ_LI() for PID comparisons.
- Link to v2: https://lore.kernel.org/ltp/[email protected]

---
 runtest/syscalls                              |  1 -
 testcases/kernel/syscalls/getpid/.gitignore   |  1 -
 testcases/kernel/syscalls/getpid/getpid02.c   | 67 -------------------
 testcases/kernel/syscalls/getppid/getppid02.c | 43 ++++++++----
 4 files changed, 31 insertions(+), 81 deletions(-)
 delete mode 100644 testcases/kernel/syscalls/getpid/getpid02.c
runtest/syscalls +0 -1
index a38743ded..62a33e3a6 100644
@@ -517,7 +517,6 @@ getpgid02 getpgid02
 getpgrp01 getpgrp01
 
 getpid01 getpid01
-getpid02 getpid02
 
 getppid01 getppid01
 getppid02 getppid02
testcases/kernel/syscalls/getpid/.gitignore +0 -1
index f44bc9eac..8e7ab0185 100644
@@ -1,2 +1 @@
 /getpid01
-/getpid02
testcases/kernel/syscalls/getpid/getpid02.c deleted +0 -67

67 lines not on this page · raw message

testcases/kernel/syscalls/getppid/getppid02.c +31 -12

64 lines not on this page · raw message

--
2.43.0

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Jinseok,

Quoted 1 line · Jinseok Kim

syscalls: consolidate getpid02 into getppid02

Verdict - Reviewed

---
Note:

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
In reply to Jinseok Kim

Hi Jinseok,

merged, with a small fix in cleanup: child_pid needed to be checked before unloading the memory:

if (child_pid)

    SAFE_MUNMAP(..)

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp