Date: Mon, 16 Feb 2026 17:58:17 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f90ee665d035 - main - pdrfork(2) tests: should wait for the child to exit Message-ID: <69935ab9.3636a.587f26d8@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f90ee665d035a5e4aea0bcaa18793e683ea253ed commit f90ee665d035a5e4aea0bcaa18793e683ea253ed Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-02-15 16:53:48 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-02-16 17:57:53 +0000 pdrfork(2) tests: should wait for the child to exit Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306 --- tests/sys/kern/pdrfork.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/pdrfork.c b/tests/sys/kern/pdrfork.c index 658ffe117bbb..8244a34b6577 100644 --- a/tests/sys/kern/pdrfork.c +++ b/tests/sys/kern/pdrfork.c @@ -45,9 +45,10 @@ basic_usage_tail(int pd, pid_t pid) ATF_REQUIRE_MSG(pd >= 0, "rfork did not return a process descriptor"); r = pdgetpid(pd, &pd_pid); ATF_CHECK_EQ_MSG(r, 0, "pdgetpid failed: %s", strerror(errno)); + ATF_CHECK_EQ(pd_pid, pid); /* We should be able to collect the child's status */ - waited_pid = waitpid(pid, &status, WEXITED | WNOWAIT); + waited_pid = waitpid(pid, &status, WEXITED); ATF_CHECK_EQ(waited_pid, pid); /* But after closing the process descriptor, we won't */ @@ -93,7 +94,7 @@ ATF_TC_BODY(child_gets_no_pidfd, tc) r = pdgetpid(pd, &pd_pid); ATF_CHECK_EQ_MSG(r, 0, "pdgetpid failed: %s", strerror(errno)); - waited_pid = waitpid(pid, &status, WEXITED | WNOWAIT); + waited_pid = waitpid(pid, &status, WEXITED); ATF_CHECK_EQ(waited_pid, pid); ATF_REQUIRE(WIFEXITED(status) && (WEXITSTATUS(status) == true));home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69935ab9.3636a.587f26d8>
