[testsuite] Unbuffer the output in gdb.base/multi-forks.c
authorYao Qi <yao.qi@linaro.org>
Thu, 21 Jan 2016 17:28:06 +0000 (17:28 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 22 Jan 2016 09:02:11 +0000 (09:02 +0000)
This patch unbuffer the output of the program so that the test harness
can count the number of "done" from output correctly.

gdb/testsuite:

2016-01-22  Yao Qi  <yao.qi@linaro.org>

PR testsuite/19491
* gdb.base/multi-forks.c: Include
../lib/unbuffer_output.c
(main): Call gdb_unbuffer_output.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/multi-forks.c

index b3b398c..d7721d5 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-22  Yao Qi  <yao.qi@linaro.org>
+
+       PR testsuite/19491
+       * gdb.base/multi-forks.c: Include
+       ../lib/unbuffer_output.c
+       (main): Call gdb_unbuffer_output.
+
 2016-01-21  Doug Evans  <dje@google.com>
 
        * lib/ada.exp (gdb_compile_ada): Fix typo.
index 994d0c7..06579c8 100644 (file)
@@ -20,6 +20,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "../lib/unbuffer_output.c"
+
 pid_t pids[4];
 
 int
@@ -27,6 +29,8 @@ main()
 {
   int i;
 
+  gdb_unbuffer_output ();
+
   for (i = 0; i < 4; i++)
     pids [i] = fork ();