[PATCH 4/4] [fixlet] selftests: prctl: return after executing test in child process
From: Usama Arif
Date: Mon Aug 18 2025 - 06:37:10 EST
The next step after executing the test is a wait, but there is
nothing to wait for in the child, so just return.
Signed-off-by: Usama Arif <usamaarif642@xxxxxxxxx>
---
tools/testing/selftests/mm/prctl_thp_disable.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/prctl_thp_disable.c b/tools/testing/selftests/mm/prctl_thp_disable.c
index 21d181ab599a2..feb711dca3a1d 100644
--- a/tools/testing/selftests/mm/prctl_thp_disable.c
+++ b/tools/testing/selftests/mm/prctl_thp_disable.c
@@ -273,9 +273,11 @@ TEST_F(prctl_thp_disable_except_madvise, fork)
pid = fork();
ASSERT_GE(pid, 0);
- if (!pid)
+ if (!pid) {
prctl_thp_disable_except_madvise_test(_metadata, self->pmdsize,
variant->thp_policy);
+ return;
+ }
wait(&ret);
if (WIFEXITED(ret))
--
2.47.3