* [PATCH] testsuite: diagnose a running GDB in gdb_skip_xml_tests
@ 2017-02-01 9:10 Markus Metzger
2017-02-01 10:41 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Markus Metzger @ 2017-02-01 9:10 UTC (permalink / raw)
To: gdb-patches; +Cc: palves
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] testsuite: diagnose a running GDB in gdb_skip_xml_tests
2017-02-01 9:10 [PATCH] testsuite: diagnose a running GDB in gdb_skip_xml_tests Markus Metzger
@ 2017-02-01 10:41 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2017-02-01 10:41 UTC (permalink / raw)
To: Markus Metzger, gdb-patches
On 02/01/2017 09:10 AM, Markus Metzger wrote:
> 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.
OK, thanks.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-01 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 9:10 [PATCH] testsuite: diagnose a running GDB in gdb_skip_xml_tests Markus Metzger
2017-02-01 10:41 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox