summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/sys/t_ptrace.c
diff options
context:
space:
mode:
authormpi <>2020-01-30 08:22:30 +0000
committermpi <>2020-01-30 08:22:30 +0000
commit668fa98385559e6ca53555e32da8e7eb618f0d80 (patch)
treea7ed8c6b1fae21213c4669bd2c105cf274af844f /src/regress/lib/libc/sys/t_ptrace.c
parenta9c1dd59a3357c18bee994783c7c8ed45d3e593a (diff)
downloadopenbsd-668fa98385559e6ca53555e32da8e7eb618f0d80.tar.gz
openbsd-668fa98385559e6ca53555e32da8e7eb618f0d80.tar.bz2
openbsd-668fa98385559e6ca53555e32da8e7eb618f0d80.zip
Enable t_ptrace with an errno change compared to NetBSD.
Note that the last test triggers a kernel bug related to waitpid(9) and ptraced processes. This is now visible thanks to recent make(1) changes. guenther@ suggests to look at the logic behind `p_orphan' in FreeBSD to fix this bug.
Diffstat (limited to 'src/regress/lib/libc/sys/t_ptrace.c')
-rw-r--r--src/regress/lib/libc/sys/t_ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regress/lib/libc/sys/t_ptrace.c b/src/regress/lib/libc/sys/t_ptrace.c
index 756c9c514e..78c4a8e47b 100644
--- a/src/regress/lib/libc/sys/t_ptrace.c
+++ b/src/regress/lib/libc/sys/t_ptrace.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_ptrace.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ 1/* $OpenBSD: t_ptrace.c,v 1.2 2020/01/30 08:22:30 mpi Exp $ */
2/* $NetBSD: t_ptrace.c,v 1.4 2018/05/14 12:44:40 kamil Exp $ */ 2/* $NetBSD: t_ptrace.c,v 1.4 2018/05/14 12:44:40 kamil Exp $ */
3 3
4/*- 4/*-
@@ -171,7 +171,7 @@ ATF_TC_BODY(attach_chroot, tc)
171 rv = write(fds_toparent[1], &msg, sizeof(msg)); 171 rv = write(fds_toparent[1], &msg, sizeof(msg));
172 FORKEE_ASSERTX(rv == sizeof(msg)); 172 FORKEE_ASSERTX(rv == sizeof(msg));
173 173
174 ATF_REQUIRE_ERRNO(EPERM, 174 ATF_REQUIRE_ERRNO(EINVAL,
175 ptrace(PT_ATTACH, getppid(), NULL, 0) == -1); 175 ptrace(PT_ATTACH, getppid(), NULL, 0) == -1);
176 176
177 rv = read(fds_fromparent[0], &msg, sizeof(msg)); 177 rv = read(fds_fromparent[0], &msg, sizeof(msg));