aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-10-14 19:59:26 +0200
committerTom de Vries <tdevries@suse.de>2022-10-14 19:59:26 +0200
commit7c635f3e61e014d713f7fc884215576187fda038 (patch)
tree0e1d46df8cc4a836b958d8df6c31d96510718713 /gdb/testsuite/gdb.server
parentc4c8c27263d2dd25647314f4897bd01ad1a78847 (diff)
downloadgdb-7c635f3e61e014d713f7fc884215576187fda038.zip
gdb-7c635f3e61e014d713f7fc884215576187fda038.tar.gz
gdb-7c635f3e61e014d713f7fc884215576187fda038.tar.bz2
[gdb/testsuite] Fix gdb.server/unittest.exp with host board local-remote-host.exp
With test-case gdb.server/unittest.exp and host board local-remote-host.exp I run into: ... builtin_spawn build/gdbserver/gdbserver --selftest^M ERROR: : spawn id exp7 not open while executing "expect { -i exp7 -timeout 10 -i $server_spawn_id -re "Ran ($decimal) unit tests, 0 failed" { set num_ran $expect_out(1,string) gdb_assert "..." ("uplevel" body line 1) invoked from within "uplevel $body" NONE : spawn id exp7 not open UNRESOLVED: gdb.server/unittest.exp: unit tests ... The problem is (as fixed for avr in commit df5b8876083 ("gdb/testsuite: better handle failures in simavr board, reap simavr process")), that gdb_expect through remote_expect adds a "-i <gdb spawn id> -timeout 10", which is the one causing the error. As in aforementioned commit, fix this by using expect instead. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r--gdb/testsuite/gdb.server/unittest.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp
index 57157ef..d083ef2 100644
--- a/gdb/testsuite/gdb.server/unittest.exp
+++ b/gdb/testsuite/gdb.server/unittest.exp
@@ -31,7 +31,7 @@ set gdbserver_command "$gdbserver --selftest"
set server_spawn_id [remote_spawn target $gdbserver_command]
set test "unit tests"
-gdb_expect {
+expect {
-i $server_spawn_id
-re "Ran ($decimal) unit tests, 0 failed" {
set num_ran $expect_out(1,string)