All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] pty04.c/pidfd_send_signal03.c: Drop redundant tst_reap_children()
@ 2022-09-05  6:14 Luo xiaoyu via ltp
  2022-09-13  6:42 ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Luo xiaoyu via ltp @ 2022-09-05  6:14 UTC (permalink / raw)
  To: ltp

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


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] pty04.c/pidfd_send_signal03.c: Drop redundant tst_reap_children()
@ 2022-09-13  9:14 luoxiaoyu (C) via ltp
  2022-09-13 10:10 ` Li Wang
  0 siblings, 1 reply; 6+ messages in thread
From: luoxiaoyu (C) via ltp @ 2022-09-13  9:14 UTC (permalink / raw)
  To: Petr Vorel, Li Wang; +Cc: LTP List

Maybe I have a question to ask for.
As my understand, tst_reap_children() has been called in API even test hit tst_brk, right?

Regards,
Luo
-----origin mail-----
Re: [LTP] [PATCH] pty04.c/pidfd_send_signal03.c: Drop redundant tst_reap_children()

> On Tue, Sep 13, 2022 at 2:42 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Luo,

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

> > LGTM, I suppose that was a mistake.


> Hmm, I slightly think that reflact a cautious thought from the author, 
> in case of test hit tst_brk unexpectly with invoke cleanup it can also 
> do reap children.

> So, it's probably no harmful to keep tst_reap_children there.
Ah, thx for info. I set status rejected in patchwork.

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-13 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05  6:14 [LTP] [PATCH] pty04.c/pidfd_send_signal03.c: Drop redundant tst_reap_children() Luo xiaoyu via ltp
2022-09-13  6:42 ` Petr Vorel
2022-09-13  7:33   ` Li Wang
2022-09-13  8:29     ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2022-09-13  9:14 luoxiaoyu (C) via ltp
2022-09-13 10:10 ` Li Wang

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.