git: 82ceed2dc7a5 - stable/14 - ptrace_test PT_SC_REMOTE: fix a race
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 May 2025 15:20:06 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=82ceed2dc7a560c6a718f75334546528d77ecb9d
commit 82ceed2dc7a560c6a718f75334546528d77ecb9d
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-04-16 15:02:58 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-05-03 15:19:41 +0000
ptrace_test PT_SC_REMOTE: fix a race
(cherry picked from commit 1f8d845d1cdfeaefa539df5f6f33bec3da65152c)
---
tests/sys/kern/ptrace_test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c
index 9aff1738f293..bc944ebf371d 100644
--- a/tests/sys/kern/ptrace_test.c
+++ b/tests/sys/kern/ptrace_test.c
@@ -4379,7 +4379,10 @@ ATF_TC_BODY(ptrace__PT_SC_REMOTE_getpid, tc)
exit(0);
}
- attach_child(fpid);
+ wpid = waitpid(fpid, &status, 0);
+ REQUIRE_EQ(wpid, fpid);
+ ATF_REQUIRE(WIFSTOPPED(status));
+ REQUIRE_EQ(WSTOPSIG(status), SIGSTOP);
pscr.pscr_syscall = SYS_getpid;
pscr.pscr_nargs = 0;