diff options
| author | kamil <kamil@NetBSD.org> | 2017-02-18 02:28:21 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2017-02-18 02:28:21 +0000 |
| commit | ee8e89293c6ad5b4cd84099eb63d43aee913b956 (patch) | |
| tree | 6c91964b53b8914740a21f48ba6a94b890f7519e /tests/kernel | |
| parent | a1a6683d3a718ae83d7713bfbdfa4802135af061 (diff) | |
Fix dbregs_dr[0123]_trap_variable in arch/amd64/t_ptrace_wait*
Add missing PT_CONTINUE between two wait(2)-like calls.
Sponsored by <The NetBSD Foundation>
Diffstat (limited to 'tests/kernel')
| -rw-r--r-- | tests/kernel/arch/amd64/t_ptrace_wait.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/kernel/arch/amd64/t_ptrace_wait.c b/tests/kernel/arch/amd64/t_ptrace_wait.c index ddd9d4223aa..f5c5f1c7fcf 100644 --- a/tests/kernel/arch/amd64/t_ptrace_wait.c +++ b/tests/kernel/arch/amd64/t_ptrace_wait.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.12 2017/02/16 15:57:45 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.13 2017/02/18 02:28:21 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.12 2017/02/16 15:57:45 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.13 2017/02/18 02:28:21 kamil Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -1392,6 +1392,9 @@ ATF_TC_BODY(dbregs_dr0_trap_variable, tc) validate_status_stopped(status, SIGTRAP); + printf("Call CONTINUE for the child process\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + printf("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); @@ -1503,6 +1506,9 @@ ATF_TC_BODY(dbregs_dr1_trap_variable, tc) validate_status_stopped(status, SIGTRAP); + printf("Call CONTINUE for the child process\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + printf("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); @@ -1614,6 +1620,9 @@ ATF_TC_BODY(dbregs_dr2_trap_variable, tc) validate_status_stopped(status, SIGTRAP); + printf("Call CONTINUE for the child process\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + printf("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); @@ -1725,6 +1734,9 @@ ATF_TC_BODY(dbregs_dr3_trap_variable, tc) validate_status_stopped(status, SIGTRAP); + printf("Call CONTINUE for the child process\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + printf("Before calling %s() for the child\n", TWAIT_FNAME); TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); |
