aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2017-01-31 17:13:46 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2017-02-01 14:43:19 +0100
commit787f00256b3eabe34b8599fca4df0243df80d5ca (patch)
treec39f3e0b7773bdad95814f1559804164751de0cc
parent68777c298919d6dbdb9537c92a64ed9440ef6f3c (diff)
downloadgdb-787f00256b3eabe34b8599fca4df0243df80d5ca.zip
gdb-787f00256b3eabe34b8599fca4df0243df80d5ca.tar.gz
gdb-787f00256b3eabe34b8599fca4df0243df80d5ca.tar.bz2
testsuite: diagnose a running GDB in gdb_skip_xml_tests
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 [...] testsuite/ * lib/gdb.exp (gdb_skip_xml_tests): Error if GDB is running.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/gdb.exp5
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 99cb9fe..0972db3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
+ * lib/gdb.exp (gdb_skip_xml_tests): Error if GDB is running.
+
+2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
+
* gdb.btrace/enable.exp: Call gdb_exit before
skip_gdbserver_tests.
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