Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Improve style of PT_SETSTEP and PT_CLEARS...
details: https://anonhg.NetBSD.org/src/rev/8dcb58a7f405
branches: trunk
changeset: 353401:8dcb58a7f405
user: kamil <kamil%NetBSD.org@localhost>
date: Wed May 03 19:46:54 2017 +0000
description:
Improve style of PT_SETSTEP and PT_CLEARSTEP tests in t_ptrace_wait*
No functional change.
Sponsored by <The NetBSD Foundation>
diffstat:
tests/lib/libc/sys/t_ptrace_wait.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 1df476526a3c -r 8dcb58a7f405 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c Wed May 03 17:28:42 2017 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c Wed May 03 19:46:54 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.8 2017/04/16 13:09:40 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.9 2017/05/03 19:46:54 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.8 2017/04/16 13:09:40 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.9 2017/05/03 19:46:54 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -4436,9 +4436,8 @@
if (setstep) {
printf("Before resuming the child process where it "
"left off and without signal to be sent (use "
- "PT_STEP)\n");
- ATF_REQUIRE(ptrace(PT_SETSTEP, child, (void *)1, 0)
- != -1);
+ "PT_SETSTEP and PT_CONTINUE)\n");
+ ATF_REQUIRE(ptrace(PT_SETSTEP, child, 0, 0) != -1);
ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0)
!= -1);
} else {
@@ -4456,8 +4455,7 @@
validate_status_stopped(status, SIGTRAP);
if (setstep) {
- ATF_REQUIRE(ptrace(PT_CLEARSTEP, child, (void *)1, 0)
- != -1);
+ ATF_REQUIRE(ptrace(PT_CLEARSTEP, child, 0, 0) != -1);
}
}
Home |
Main Index |
Thread Index |
Old Index