Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel - Unbuffer stdout and stderr, because the trace...



details:   https://anonhg.NetBSD.org/src/rev/ab18d7bdd69b
branches:  trunk
changeset: 348870:ab18d7bdd69b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 12 16:23:43 2016 +0000

description:
- Unbuffer stdout and stderr, because the tracee ends up with with the tracers
  unflushed buffers, and that confuses things.

diffstat:

 tests/kernel/t_ptrace.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 709f28639dc1 -r ab18d7bdd69b tests/kernel/t_ptrace.c
--- a/tests/kernel/t_ptrace.c   Sat Nov 12 16:23:36 2016 +0000
+++ b/tests/kernel/t_ptrace.c   Sat Nov 12 16:23:43 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace.c,v 1.15 2016/11/08 14:49:04 kamil Exp $      */
+/*     $NetBSD: t_ptrace.c,v 1.16 2016/11/12 16:23:43 christos Exp $   */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace.c,v 1.15 2016/11/08 14:49:04 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace.c,v 1.16 2016/11/12 16:23:43 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -170,6 +170,8 @@
 
 ATF_TP_ADD_TCS(tp)
 {
+       setvbuf(stdout, NULL, _IONBF, 0);
+       setvbuf(stderr, NULL, _IONBF, 0);
        ATF_TP_ADD_TC(tp, attach_pid0);
        ATF_TP_ADD_TC(tp, attach_pid1);
        ATF_TP_ADD_TC(tp, attach_self);



Home | Main Index | Thread Index | Old Index