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 Cover SIGTSTP, SIGTTIN and S...



details:   https://anonhg.NetBSD.org/src/rev/919fff0bc3c7
branches:  trunk
changeset: 319151:919fff0bc3c7
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat May 19 05:25:21 2018 +0000

description:
Cover SIGTSTP, SIGTTIN and SIGTTOU in traceme_vfork_raise ATF tests

SIGTSTP, SIGTTIN and SIGTTOU are special case signals ignored in a
vfork(2)ed child. Assert the behavior of raise(2) after calling
PT_TRACE_ME.

Renumber existing traceme_vfork_raise tests.

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |  19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r 0e8a43404abb -r 919fff0bc3c7 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Sat May 19 05:10:16 2018 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Sat May 19 05:25:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.46 2018/05/19 05:07:42 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.c,v 1.47 2018/05/19 05:25: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.46 2018/05/19 05:07:42 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.47 2018/05/19 05:25:21 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -513,6 +513,9 @@
                validate_status_signaled(status, SIGKILL, 0);
                break;
        case SIGCONT:
+       case SIGTSTP:
+       case SIGTTIN:
+       case SIGTTOU:
                validate_status_exited(status, exitval);
                break;
        default:
@@ -542,9 +545,12 @@
 
 TRACEME_VFORK_RAISE(traceme_vfork_raise1, SIGKILL) /* non-maskable */
 TRACEME_VFORK_RAISE(traceme_vfork_raise2, SIGSTOP) /* non-maskable */
-TRACEME_VFORK_RAISE(traceme_vfork_raise3, SIGABRT) /* regular abort trap */
-TRACEME_VFORK_RAISE(traceme_vfork_raise4, SIGHUP)  /* hangup */
-TRACEME_VFORK_RAISE(traceme_vfork_raise5, SIGCONT) /* continued? */
+TRACEME_VFORK_RAISE(traceme_vfork_raise3, SIGTSTP) /* ignored in vfork(2) */
+TRACEME_VFORK_RAISE(traceme_vfork_raise4, SIGTTIN) /* ignored in vfork(2) */
+TRACEME_VFORK_RAISE(traceme_vfork_raise5, SIGTTOU) /* ignored in vfork(2) */
+TRACEME_VFORK_RAISE(traceme_vfork_raise6, SIGABRT) /* regular abort trap */
+TRACEME_VFORK_RAISE(traceme_vfork_raise7, SIGHUP)  /* hangup */
+TRACEME_VFORK_RAISE(traceme_vfork_raise8, SIGCONT) /* continued? */
 
 /// ----------------------------------------------------------------------------
 
@@ -7119,6 +7125,9 @@
        ATF_TP_ADD_TC(tp, traceme_vfork_raise3);
        ATF_TP_ADD_TC(tp, traceme_vfork_raise4);
        ATF_TP_ADD_TC(tp, traceme_vfork_raise5);
+       ATF_TP_ADD_TC(tp, traceme_vfork_raise6);
+       ATF_TP_ADD_TC(tp, traceme_vfork_raise7);
+       ATF_TP_ADD_TC(tp, traceme_vfork_raise8);
 
        ATF_TP_ADD_TC(tp, traceme_vfork_breakpoint);
 



Home | Main Index | Thread Index | Old Index