[LTP] [PATCH] pty04.c/pidfd_send_signal03.c: Drop redundant tst_reap_children()

Luo xiaoyu luoxiaoyu9@huawei.com
Mon Sep 5 08:14:25 CEST 2022


Drop redundant calling of tst_reap_children() in cleanup() since
it has been called in the API (run_tests()).

Signed-off-by: Luo xiaoyu <luoxiaoyu9@huawei.com>
---
 testcases/kernel/pty/pty04.c                                    | 2 --
 .../kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c     | 1 -
 2 files changed, 3 deletions(-)

diff --git a/testcases/kernel/pty/pty04.c b/testcases/kernel/pty/pty04.c
index 8c7b1bf92..efd5bd364 100644
--- a/testcases/kernel/pty/pty04.c
+++ b/testcases/kernel/pty/pty04.c
@@ -462,8 +462,6 @@ static void cleanup(void)
 	if (sk >= 0)
 		close(sk);
-
-	tst_reap_children();
 }
 static struct tst_test test = {
diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
index 20d96b118..5bc5c4d81 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
@@ -128,7 +128,6 @@ static void setup(void)
 static void cleanup(void)
 {
-	tst_reap_children();
 	if (new_pidfd > 0)
 		SAFE_CLOSE(new_pidfd);
 	if (pidfd > 0)
--
2.17.1



More information about the ltp mailing list