Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel switch to using fork so we can see the child ou...



details:   https://anonhg.NetBSD.org/src/rev/35463e114954
branches:  trunk
changeset: 819468:35463e114954
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 06 18:59:00 2016 +0000

description:
switch to using fork so we can see the child output.

diffstat:

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

diffs (truncated from 504 to 300 lines):

diff -r 2ee61891ed77 -r 35463e114954 tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c      Tue Dec 06 18:41:02 2016 +0000
+++ b/tests/kernel/t_ptrace_wait.c      Tue Dec 06 18:59:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.44 2016/12/06 08:03:09 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.c,v 1.45 2016/12/06 18:59:00 christos Exp $      */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.44 2016/12/06 08:03:09 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.45 2016/12/06 18:59:00 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -82,7 +82,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -141,7 +141,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -196,7 +196,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -245,7 +245,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -980,7 +980,7 @@
        const int len = sizeof(ptrace_event_t);
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1035,7 +1035,7 @@
        const int len = sizeof(ptrace_event_t);
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1095,7 +1095,7 @@
        const int elen = sizeof(event);
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1216,7 +1216,7 @@
        const int elen = sizeof(event);
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1305,7 +1305,7 @@
        atf_tc_expect_fail("PR kern/51630");
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1426,7 +1426,7 @@
        const int elen = sizeof(event);
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1508,7 +1508,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1573,7 +1573,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1638,7 +1638,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1703,7 +1703,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1768,7 +1768,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1832,7 +1832,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1896,7 +1896,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -1960,7 +1960,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2018,7 +2018,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2081,7 +2081,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2156,7 +2156,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2243,7 +2243,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2334,7 +2334,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2392,7 +2392,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2457,7 +2457,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2529,7 +2529,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2614,7 +2614,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2700,7 +2700,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2774,7 +2774,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2847,7 +2847,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -2974,7 +2974,7 @@
 #endif
 
        printf("Before forking process PID=%d\n", getpid());
-       child = atf_utils_fork();
+       ATF_REQUIRE((child = fork()) != -1);
        if (child == 0) {
                printf("Before calling PT_TRACE_ME from child %d\n", getpid());
                FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
@@ -3038,7 +3038,7 @@
 #endif
 



Home | Main Index | Thread Index | Old Index