Module Name:    src
Committed By:   kamil
Date:           Wed May  3 19:46:54 UTC 2017

Modified Files:
        src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Improve style of PT_SETSTEP and PT_CLEARSTEP tests in t_ptrace_wait*

No functional change.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/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/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.8 src/tests/lib/libc/sys/t_ptrace_wait.c:1.9
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.8	Sun Apr 16 13:09:40 2017
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Wed May  3 19:46:54 2017
@@ -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 @@ ptrace_step(int N, int setstep)
 		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 @@ ptrace_step(int N, int setstep)
 		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);
 		}
 	}
 

Reply via email to