public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.server/unittest.exp with host board local-remote-host.exp Date: Fri, 14 Oct 2022 17:59:40 +0000 (GMT) [thread overview] Message-ID: <20221014175940.B05DD385843E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7c635f3e61e014d713f7fc884215576187fda038 commit 7c635f3e61e014d713f7fc884215576187fda038 Author: Tom de Vries <tdevries@suse.de> Date: Fri Oct 14 19:59:26 2022 +0200 [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. Diff: --- gdb/testsuite/gdb.server/unittest.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp index 57157ef8d35..d083ef25487 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)
reply other threads:[~2022-10-14 17:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221014175940.B05DD385843E@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).