git: bba959f73e52 - stable/15 - tests/sys/kern/pdwait: adjust test for the addition of CAP_PTRACE

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sat, 05 Sep 2026 00:35:25 UTC
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=bba959f73e52e284432b2a9569ce2f6f386d502d

commit bba959f73e52e284432b2a9569ce2f6f386d502d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-28 08:35:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-09-05 00:33:40 +0000

    tests/sys/kern/pdwait: adjust test for the addition of CAP_PTRACE
    
    (cherry picked from commit 5f5910ba3826435391d3e5b9ba9155376ec0b39d)
---
 tests/sys/kern/pdwait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/sys/kern/pdwait.c b/tests/sys/kern/pdwait.c
index 92c8c1b2b3ca..f95cbe2c3a4f 100644
--- a/tests/sys/kern/pdwait.c
+++ b/tests/sys/kern/pdwait.c
@@ -199,7 +199,7 @@ ATF_TC_BODY(enotcap, tc)
 	CAP_ALL(&rights);
 	cap_rights_clear(&rights, CAP_PDWAIT);
 
-	pid = pdfork(&fdp, 0);
+	pid = pdfork(&fdp, PD_PTRACE_CAP);
 	if (pid == 0)
 		_exit(42);
 	ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));