old-cross-binutils/gdb/testsuite/lib
Pedro Alves 749ef8f891 gdb_test_multiple match eof of any spawn_id
Since silent handling of eof is usually the wrong thing to do, this
patch makes gdb_test_multiple handle it for all $any_spawn_id.

Currently, against gdbserver, interrupt.exp occasionaly fails like
this:

 FAIL: gdb.base/interrupt.exp: send end of file

gdb.log with expect debug output enabled shows:

 expect: does "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" (spawn_id exp8) match regular expression "end of file"? Gate "end of file"? gate=no
 expect: read eof
 expect: set expect_out(spawn_id) "exp8"
 expect: set expect_out(buffer) "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n"
 FAIL: gdb.base/interrupt.exp: send end of file

Note "expect: read eof" for spawn_id=exp8.  exp8 is
inferior_spawn_id/gdbserver_spawn_id.  That means
expect/gdb_test_multiple saw gdbserver exit before we got the expected
gdb output.  Since there's no explicit pattern for "eof", expect (and
thus gdb_test_multiple) just returns.

After this commit, we get instead:

 ERROR: Process no longer exists
 UNRESOLVED: gdb.base/interrupt.exp: send end of file

Note that before we still got an FAIL because $saw_inferior_exit is 0
when we get to:

	gdb_assert { $saw_eof && $saw_inferior_exit } $msg

Fixing the fail (now unresolved) will be the subject of a separate
patch.

gdb/testsuite/ChangeLog:
2015-04-23  Pedro Alves  <palves@redhat.com>

	* lib/gdb.exp (gdb_test_multiple): Match eof/full_buffer/timeout
	on $any_spawn_id instead of only on $gdb_spawn_id.
2015-04-23 15:48:26 +01:00
..
ada.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
append_gdb_boards_dir.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cache.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cell.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cl_util.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cl_util.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compiler.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compiler.cc Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cp-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
d-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dtrace.exp Simple testsuite for DTrace USDT probes. 2015-02-17 16:41:16 +01:00
dwarf.exp dwarf.exp: Allow generating a stub .debug_line section 2015-03-31 16:25:07 +02:00
fortran.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
future.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb-guile.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb-python.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb-utils.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb.exp gdb_test_multiple match eof of any spawn_id 2015-04-23 15:48:26 +01:00
gdbserver-support.exp Fix gdbserver_reconnect_p handling 2015-04-16 14:26:59 +01:00
go.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
java.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-support.exp Accept all-stop alternative in mi_expect_interrupt 2015-03-04 17:56:58 -05:00
objc.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
opencl.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
opencl_hostapp.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
opencl_kernel.cl
pascal.exp Fix pascal behavior for class fields with testcase 2015-04-21 22:10:08 +02:00
pdtrace.in Simple testsuite for DTrace USDT probes. 2015-02-17 16:41:16 +01:00
perftest.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
prelink-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
prompt.exp Introduce gdb_interact in testsuite 2015-01-22 15:49:08 -05:00
range-stepping-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
read1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
selftest-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
set_unbuffered_mode.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-support.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
unbuffer_output.c Add "../lib/unbuffer_output.c" and use it in gdb.base/interrupt.c 2015-02-27 13:54:22 +00:00