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 The *fork*_signalmasked ATF tests no long...



details:   https://anonhg.NetBSD.org/src/rev/1966eebc2ef2
branches:  trunk
changeset: 997945:1966eebc2ef2
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Apr 03 08:19:46 2019 +0000

description:
The *fork*_signalmasked ATF tests no longer fail

Add a fixup for signalmasking in the vforkdone_singalmasked test.

diffstat:

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

diffs (41 lines):

diff -r 8a46d2541243 -r 1966eebc2ef2 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Wed Apr 03 08:07:59 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Wed Apr 03 08:19:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.101 2019/03/28 08:13:40 kamil Exp $        */
+/*     $NetBSD: t_ptrace_wait.c,v 1.102 2019/04/03 08:19:46 kamil Exp $        */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.101 2019/03/28 08:13:40 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.102 2019/04/03 08:19:46 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -5221,9 +5221,6 @@
        ki_sigset_t kp_sigmask;
        ki_sigset_t kp_sigignore;
 
-       if (masked)
-               atf_tc_expect_fail("Masked signal invisible to tracer");
-
        if (trackfork)
                fn = fork;
        if (trackvfork || trackvforkdone)
@@ -5447,6 +5444,12 @@
                name[3] = child;
                ATF_REQUIRE_EQ(sysctl(name, namelen, &kp, &len, NULL, 0), 0);
 
+               /*
+                * SIGCHLD is now pending in the signal queue and
+                * the kernel presents it to userland as a masked signal.
+                */
+               sigdelset((sigset_t *)&kp.p_sigmask, SIGCHLD);
+
                if (masked) {
                        DPRINTF("kp_sigmask="
                            "%#02" PRIx32 "%02" PRIx32 "%02" PRIx32 "%02"



Home | Main Index | Thread Index | Old Index