]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[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 b3b398cc46172eacd9167ca10ae0e210dc9cac88..d7721d593d221457bf1bdc78369dcad8ededb72b 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 994d0c7f8dc2d6eae844ff872ac297e94fe1243a..06579c8eb39ef57d55e9481098800e6091cd7d6a 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 ();