All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jinseok Kim <always.starving0@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] getppid: Link manpage and fix minor issues
Date: Sun,  3 May 2026 17:55:39 +0900	[thread overview]
Message-ID: <20260503085544.16915-3-always.starving0@gmail.com> (raw)
In-Reply-To: <20260503085544.16915-1-always.starving0@gmail.com>

Link to the manpage in docparse comments.

Also remove the unused <error.h> header and tighten the ppid bounds check.

Signed-off-by: Jinseok Kim <always.starving0@gmail.com>
---
 testcases/kernel/syscalls/getppid/getppid01.c | 6 +++---
 testcases/kernel/syscalls/getppid/getppid02.c | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/testcases/kernel/syscalls/getppid/getppid01.c b/testcases/kernel/syscalls/getppid/getppid01.c
index 3f05aed37..5b5e6cceb 100644
--- a/testcases/kernel/syscalls/getppid/getppid01.c
+++ b/testcases/kernel/syscalls/getppid/getppid01.c
@@ -5,10 +5,10 @@
  */

 /*\
- * Test whether parent process id that getppid() returns is out of range.
+ * Test whether parent process id that :manpage:`getppid(2)` returns is
+ * out of range.
  */

-#include <errno.h>
 #include "tst_test.h"

 static pid_t pid_max;
@@ -23,7 +23,7 @@ static void verify_getppid(void)
 	pid_t ppid;

 	ppid = getppid();
-	if (ppid > pid_max)
+	if (ppid < 1 || ppid > pid_max)
 		tst_res(TFAIL, "getppid() returned %d, out of range!", ppid);
 	else
 		tst_res(TPASS, "getppid() returned %d", ppid);
diff --git a/testcases/kernel/syscalls/getppid/getppid02.c b/testcases/kernel/syscalls/getppid/getppid02.c
index 7497eba12..a2796406f 100644
--- a/testcases/kernel/syscalls/getppid/getppid02.c
+++ b/testcases/kernel/syscalls/getppid/getppid02.c
@@ -4,11 +4,10 @@
  */

 /*\
- * Check that getppid() in child returns the same pid as getpid() in parent.
+ * Check that :manpage:`getppid(2)` in child returns the same pid as
+ * :manpage:`getpid(2)` in parent.
  */

-#include <errno.h>
-
 #include "tst_test.h"

 static void verify_getppid(void)
--
2.43.0

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

  parent reply	other threads:[~2026-05-03  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-03  8:55 [LTP] [PATCH 0/2] syscalls: clean up getpid/getppid tests Jinseok Kim
2026-05-03  8:55 ` [LTP] [PATCH 1/2] getpid: Link manpage and fix minor issues Jinseok Kim
2026-05-06 14:47   ` Andrea Cervesato via ltp
2026-05-12 14:35     ` Jinseok Kim
2026-05-03  8:55 ` Jinseok Kim [this message]
2026-05-06 14:46   ` [LTP] [PATCH 2/2] getppid: " Andrea Cervesato via ltp

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=20260503085544.16915-3-always.starving0@gmail.com \
    --to=always.starving0@gmail.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.