summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/sys/t_ptrace.c
diff options
context:
space:
mode:
authorbluhm <>2020-11-09 23:18:51 +0000
committerbluhm <>2020-11-09 23:18:51 +0000
commitc369d42df84f5bdabcac9041e6c5680a0cbfeaf9 (patch)
tree2233f16128b2705882f46a8369c9f9f47f40af5c /src/regress/lib/libc/sys/t_ptrace.c
parent999ec352efbeb24cccd1d584b91a659b15764151 (diff)
downloadopenbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.gz
openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.bz2
openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.zip
Sync libc syscall tests with changes in upstream NetBSD. Use #ifdef
to document differences to NetBSD behaviour, this helps to track upstream. Mark currently failing test as expected failures. So test programs get compiled and executed, but it shows that further investigation is necceassry.
Diffstat (limited to 'src/regress/lib/libc/sys/t_ptrace.c')
-rw-r--r--src/regress/lib/libc/sys/t_ptrace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/regress/lib/libc/sys/t_ptrace.c b/src/regress/lib/libc/sys/t_ptrace.c
index e651dec0a1..a48616efb2 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.3 2020/02/02 20:18:17 bluhm Exp $ */ 1/* $OpenBSD: t_ptrace.c,v 1.4 2020/11/09 23:18:51 bluhm 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,11 @@ 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#ifdef __OpenBSD__
174 ATF_REQUIRE_ERRNO(EINVAL, 175 ATF_REQUIRE_ERRNO(EINVAL,
176#else
177 ATF_REQUIRE_ERRNO(EPERM,
178#endif
175 ptrace(PT_ATTACH, getppid(), NULL, 0) == -1); 179 ptrace(PT_ATTACH, getppid(), NULL, 0) == -1);
176 180
177 rv = read(fds_fromparent[0], &msg, sizeof(msg)); 181 rv = read(fds_fromparent[0], &msg, sizeof(msg));