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 Rename suspend2 to suspend_no_deadlock



details:   https://anonhg.NetBSD.org/src/rev/0b132b098421
branches:  trunk
changeset: 744674:0b132b098421
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Feb 10 11:42:41 2020 +0000

description:
Rename suspend2 to suspend_no_deadlock

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |  38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)

diffs (79 lines):

diff -r 5d1cb80b1538 -r 0b132b098421 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Mon Feb 10 10:05:55 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Mon Feb 10 11:42:41 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.153 2020/02/05 23:43:18 kamil Exp $        */
+/*     $NetBSD: t_ptrace_wait.c,v 1.154 2020/02/10 11:42:41 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.153 2020/02/05 23:43:18 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.154 2020/02/10 11:42:41 kamil Exp $");
 
 #define __LEGACY_PT_LWPINFO
 
@@ -7249,27 +7249,15 @@
 
 /// ----------------------------------------------------------------------------
 
-volatile lwpid_t the_lwp_id = 0;
-
-static void
-lwp_main_stop(void *arg)
-{
-       the_lwp_id = _lwp_self();
-
-       raise(SIGTRAP);
-
-       _lwp_exit();
-}
-
-ATF_TC(suspend2);
-ATF_TC_HEAD(suspend2, tc)
+ATF_TC(suspend_no_deadlock);
+ATF_TC_HEAD(suspend_no_deadlock, tc)
 {
        atf_tc_set_md_var(tc, "descr",
            "Verify that the while the only thread within a process is "
            "suspended, the whole process cannot be unstopped");
 }
 
-ATF_TC_BODY(suspend2, tc)
+ATF_TC_BODY(suspend_no_deadlock, tc)
 {
        const int exitval = 5;
        const int sigval = SIGSTOP;
@@ -7327,6 +7315,20 @@
        TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
 }
 
+/// ----------------------------------------------------------------------------
+
+volatile lwpid_t the_lwp_id = 0;
+
+static void
+lwp_main_stop(void *arg)
+{
+       the_lwp_id = _lwp_self();
+
+       raise(SIGTRAP);
+
+       _lwp_exit();
+}
+
 ATF_TC(resume1);
 ATF_TC_HEAD(resume1, tc)
 {
@@ -9257,7 +9259,7 @@
 
        ATF_TP_ADD_TC(tp, threads_and_exec);
 
-       ATF_TP_ADD_TC(tp, suspend2);
+       ATF_TP_ADD_TC(tp, suspend_no_deadlock);
 
        ATF_TP_ADD_TC(tp, resume1);
 



Home | Main Index | Thread Index | Old Index