Commit Graph

8 Commits

Author SHA1 Message Date
Pedro Alves dedad4e3d2 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.
2015-07-29 11:09:45 +01:00
Andreas Arnez 3b5d599733 GDB testsuite: drop non-prototype C function header variants
Remove many old-style function header variants in C source files of
the GDB test suite, using the 'unifdef' tool with '-DPROTOTYPES=1'.

gdb/testsuite/ChangeLog:

	* gdb.base/annota1.c: Remove #ifdef PROTOTYPES, keep prototyped
	variant.
	* gdb.base/annota3.c: Likewise.
	* gdb.base/async.c: Likewise.
	* gdb.base/average.c: Likewise.
	* gdb.base/call-ar-st.c: Likewise.
	* gdb.base/call-rt-st.c: Likewise.
	* gdb.base/call-sc.c: Likewise.
	* gdb.base/call-strs.c: Likewise.
	* gdb.base/ending-run.c: Likewise.
	* gdb.base/execd-prog.c: Likewise.
	* gdb.base/exprs.c: Likewise.
	* gdb.base/foll-exec.c: Likewise.
	* gdb.base/foll-fork.c: Likewise.
	* gdb.base/foll-vfork.c: Likewise.
	* gdb.base/funcargs.c: Likewise.
	* gdb.base/gcore.c: Likewise.
	* gdb.base/jump.c: Likewise.
	* gdb.base/langs0.c: Likewise.
	* gdb.base/langs1.c: Likewise.
	* gdb.base/langs2.c: Likewise.
	* gdb.base/mips_pro.c: Likewise.
	* gdb.base/nodebug.c: Likewise.
	* gdb.base/opaque0.c: Likewise.
	* gdb.base/opaque1.c: Likewise.
	* gdb.base/recurse.c: Likewise.
	* gdb.base/run.c: Likewise.
	* gdb.base/scope0.c: Likewise.
	* gdb.base/scope1.c: Likewise.
	* gdb.base/setshow.c: Likewise.
	* gdb.base/setvar.c: Likewise.
	* gdb.base/shmain.c: Likewise.
	* gdb.base/shr1.c: Likewise.
	* gdb.base/shr2.c: Likewise.
	* gdb.base/sigall.c: Likewise.
	* gdb.base/signals.c: Likewise.
	* gdb.base/so-indr-cl.c: Likewise.
	* gdb.base/solib2.c: Likewise.
	* gdb.base/structs.c: Likewise.
	* gdb.base/sum.c: Likewise.
	* gdb.base/vforked-prog.c: Likewise.
	* gdb.base/watchpoint.c: Likewise.
	* gdb.reverse/shr2.c: Likewise.
	* gdb.reverse/until-reverse.c: Likewise.
	* gdb.reverse/ur1.c: Likewise.
	* gdb.reverse/watch-reverse.c: Likewise.
2014-11-13 10:20:44 +01:00
Andreas Arnez 888a2adec7 Eliminate literal line numbers in call-ar-st.exp
Remove literal line numbers from the regexps in call-ar-st.exp.  Add
appropriate eye-catchers to call-ar-st.c and refer to those instead.

gdb/testsuite/ChangeLog:

	* gdb.base/call-ar-st.c: Add eye-catchers.
	* gdb.base/call-ar-st.exp: Refer to eye-catchers instead of
	literal line numbers.
2014-11-13 10:14:30 +01:00
Corinna Vinschen 1b7c05e765 * gdb.base/call-ar-st.c (print_double_array): Match for loop
with new double_array size.
	(main): Change storage class of all local variables to static.
	Reduce size of double_array to 9.
	* gdb.base/call-ar-st.exp:  Increase timeout value.
	Change expected output for double array to match new size in
	call-ar-st.c.
2001-10-29 18:20:22 +00:00
Philippe De Muyter 591b8fa3ef * gdb.base/call-ar-st.c (init_small_structs, main): Use floating-point
values that can be represented exactly.
	* gdb.base/call-ar-st.exp (print print_small_structs): Fixed to match
	above change, and to not check against the directory part of the source
	file name.
	(step into print_long_arg_list): Likewise.
	(print print_small_structs from print_long_arg_list): Likewise.
	(print print_long_arg_list): Likewise.
2000-03-30 23:32:30 +00:00
Jason Molenda 085dd6e638 import gdb-1999-06-28 snapshot 1999-06-28 16:06:02 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00