aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/interrupt.exp13
2 files changed, 17 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 71fdd48..1d5820b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-04-23 Pedro Alves <palves@redhat.com>
+ * gdb.base/interrupt.exp: Use an indirect spawn id list holding
+ $inferior_spawn_id instead of $inferior_spawn_id directly. On
+ "end of file", remove $inferior_spawn_id from the indirect list.
+
+2015-04-23 Pedro Alves <palves@redhat.com>
+
* gdb.base/interrupt.exp: Rename saw_eof to saw_end_of_file.
2015-04-23 Pedro Alves <palves@redhat.com>
diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp
index 17a9bad..f594ba4 100644
--- a/gdb/testsuite/gdb.base/interrupt.exp
+++ b/gdb/testsuite/gdb.base/interrupt.exp
@@ -205,12 +205,21 @@ if ![file exists $binfile] then {
set msg "send end of file"
send_inferior "\004"
+
+ set spawn_list "$inferior_spawn_id"
+
gdb_test_multiple "" $msg {
- -i $inferior_spawn_id -re "end of file" {
- verbose -log "saw \"end of file\": $saw_end_of_file"
+ -i spawn_list -re "end of file" {
set saw_end_of_file 1
verbose -log "saw \"end of file\""
if {!$saw_inferior_exit} {
+ # When $inferior_spawn_id != $gdb_spawn_id, such
+ # as when testing with gdbserver, we may see the
+ # eof (the process exit, not the string just
+ # matched) for $inferior_spawn_id before the
+ # expected gdb output. Clear this so we no longer
+ # expect anything out of $inferior_spawn_id.
+ set spawn_list ""
exp_continue
}
}