summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/call-ar-st.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-07-29 11:09:45 +0100
committerPedro Alves <palves@redhat.com>2015-07-29 11:09:45 +0100
commitdedad4e3d2ed1d6ecdb89422fc0baa028021f19d (patch)
tree2a50dafe48cf46b23fc11fe8474981498f0a3be2 /gdb/testsuite/gdb.base/call-ar-st.c
parent58789a917b7eed57c5200ec0a4d8a2fc44efc64c (diff)
Unbuffer all tests that rely on stdio
This forces all tests that rely on stdio to be unbuffered, like interrupt.exp was adjusted in 6f98576f. To recap, in some scenarios, GDB or GDBserver can be spawned with input _not_ connected to a tty, and then tests that rely on stdio fail with timeouts, because the inferior's stdout and stderr streams end up fully buffered. Calling gdb_unbuffer_output forces output to be unbuffered. See https://sourceware.org/ml/gdb-patches/2015-02/msg00809.html and https://sourceware.org/ml/gdb-patches/2015-02/msg00819.html. Tested on x86_64 Fedora 20, native, and against a remote gdbserver board file that connects to the target with ssh, with and without -t (create pty). gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.base/call-ar-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-rt-st.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/call-strs.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/catch-gdb-caused-signals.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/ending-run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/run.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/shlib-call.exp: Adjust to step over the gdb_unbuffer_output call. * gdb.base/shmain.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/sizeof.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output. * gdb.base/varargs.c: Include "../lib/unbuffer_output.c". (main): Rename to ... (test): ... this. (main): Reimplement. * gdb.base/varargs.exp: Run to test instead of to main. * gdb.mi/mi-dprintf.c: Include "../lib/unbuffer_output.c". (main): Call gdb_unbuffer_output.
Diffstat (limited to 'gdb/testsuite/gdb.base/call-ar-st.c')
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/call-ar-st.c b/gdb/testsuite/gdb.base/call-ar-st.c
index 4b2ffb4462..497af84085 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.c
+++ b/gdb/testsuite/gdb.base/call-ar-st.c
@@ -3,6 +3,8 @@
#include <stdlib.h>
#include <string.h>
+#include "../lib/unbuffer_output.c"
+
/**************************************************************************
* TESTS :
* -- function arguments that are enumerated types
@@ -912,6 +914,8 @@ int main () {
static struct two_floats_t *f2;
static struct two_floats_t *f3;
+ gdb_unbuffer_output ();
+
/* Initialize arrays
*/
for (index = 0; index < 120; index++) {