From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Cc: palves@redhat.com
Subject: [PATCH] testsuite: diagnose a running GDB in gdb_skip_xml_tests
Date: Wed, 01 Feb 2017 09:10:00 -0000 [thread overview]
Message-ID: <1485940235-28957-1-git-send-email-markus.t.metzger@intel.com> (raw)
If GDB is running when gdb_skip_xml_tests is called with
--target_board=native-extended-gdbserer.exp, it fails with:
(gdb) FAIL: ....exp: set tdesc filename .../trivial.xml (got interactive prompt)
monitor exit
Diagnose this in gdb_skip_xml_tests to generate a more meaningful error message:
ERROR: tcl error sourcing ....exp.
ERROR: GDB must not be running in gdb_skip_xml_tests.
while executing
[...]
2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
testsuite/
* lib/gdb.exp (gdb_skip_xml_tests): Error if GDB is running.
---
gdb/testsuite/lib/gdb.exp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 48bd7ee..188484f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5030,9 +5030,14 @@ proc gdb_skip_bogus_test { msg } {
# NOTE: This must be called while gdb is *not* running.
gdb_caching_proc gdb_skip_xml_test {
+ global gdb_spawn_id
global gdb_prompt
global srcdir
+ if { [info exists gdb_spawn_id] } {
+ error "GDB must not be running in gdb_skip_xml_tests."
+ }
+
set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"]
gdb_start
--
1.8.3.1
next reply other threads:[~2017-02-01 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 9:10 Markus Metzger [this message]
2017-02-01 10:41 ` Pedro Alves
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=1485940235-28957-1-git-send-email-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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: link
Be 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