Module Name: src Committed By: kamil Date: Sat Feb 18 02:28:21 UTC 2017
Modified Files: src/tests/kernel/arch/amd64: t_ptrace_wait.c Log Message: 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> To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/kernel/arch/amd64/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/kernel/arch/amd64/t_ptrace_wait.c diff -u src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.12 src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.13 --- src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.12 Thu Feb 16 15:57:45 2017 +++ src/tests/kernel/arch/amd64/t_ptrace_wait.c Sat Feb 18 02:28:21 2017 @@ -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);