Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel Expect SIGSTOP in attach3 in t_ptrace_wait{, 3, 4...



details:   https://anonhg.NetBSD.org/src/rev/366c3832193b
branches:  trunk
changeset: 819013:366c3832193b
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Nov 12 16:33:48 2016 +0000

description:
Expect SIGSTOP in attach3 in t_ptrace_wait{,3,4,6,id,pid}

Set SIGSTOP as expected signal in attach3, is it is preferred in general.
Not just because FreeBSD and Linux work this way, but to make it consistent
and regardless of relation between tracee and tracer always get the same
signal.

attach3 tests parent attaching with PT_ATTACH to its child

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/kernel/t_ptrace_wait.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5a26f939805d -r 366c3832193b tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c      Sat Nov 12 16:23:43 2016 +0000
+++ b/tests/kernel/t_ptrace_wait.c      Sat Nov 12 16:33:48 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.7 2016/11/12 16:23:36 christos Exp $       */
+/*     $NetBSD: t_ptrace_wait.c,v 1.8 2016/11/12 16:33:48 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.7 2016/11/12 16:23:36 christos Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.8 2016/11/12 16:33:48 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -878,7 +878,7 @@
        TWAIT_REQUIRE_SUCCESS(
            wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
 
-       validate_status_stopped(status, SIGTRAP);
+       validate_status_stopped(status, SIGSTOP);
 
        printf("Resume tracee with PT_CONTINUE\n");
        ATF_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);



Home | Main Index | Thread Index | Old Index