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 Adapt t_ptrace_wait* tests for recent ker...



details:   https://anonhg.NetBSD.org/src/rev/02fa42e0c30d
branches:  trunk
changeset: 450994:02fa42e0c30d
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu May 02 22:52:21 2019 +0000

description:
Adapt t_ptrace_wait* tests for recent kernel changes

Adapt AUXV reading loop to handle io.piod_len == 0 as EOF.

Temporarily disable trace_thread_lwpcreate until it will be verified that
it is stable.

diffstat:

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

diffs (40 lines):

diff -r 850e84b7816f -r 02fa42e0c30d tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Thu May 02 22:23:49 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Thu May 02 22:52:21 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.119 2019/05/02 00:34:06 kamil Exp $        */
+/*     $NetBSD: t_ptrace_wait.c,v 1.120 2019/05/02 22:52:21 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.119 2019/05/02 00:34:06 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.120 2019/05/02 22:52:21 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -4063,10 +4063,10 @@
                errno = 0;
                i = 0;
                /* Read the whole AUXV vector, it has no clear length */
-               while (errno != EIO) {
+               while (io.piod_len > 0) {
                        io.piod_offs = (void *)(intptr_t)i;
                        SYSCALL_REQUIRE(ptrace(PT_IO, child, &io, sizeof(io))
-                                       != -1 || (errno == EIO && i > 0));
+                                       != -1 || (io.piod_len == 0 && i > 0));
                        ++i;
                }
        }
@@ -5359,7 +5359,7 @@
        /* Track created and exited threads */
        bool traced_lwps[__arraycount(t)];
 
-       if (trace_exit)
+       if (trace_create || trace_exit)
                atf_tc_skip("PR kern/51995");
 
        DPRINTF("Before forking process PID=%d\n", getpid());



Home | Main Index | Thread Index | Old Index