public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH OBV] Skip gdb.mi/list-thread-groups-available.exp if no xml support
@ 2017-11-03 12:53 Yao Qi
  0 siblings, 0 replies; only message in thread
From: Yao Qi @ 2017-11-03 12:53 UTC (permalink / raw)
  To: gdb-patches

I see the following test fail in gdb (configured --with-expat=no),

-list-thread-groups --available^M
&"warning: Can not parse XML OS data; XML support was disabled at compile time\n"^M
^error,msg="Can not fetch data now."^M
(gdb) ^M
FAIL: gdb.mi/list-thread-groups-available.exp: list available thread groups (unexpected output)

This patch skips it if XML parsing in GDB is disabled, like what you did
in gdb.mi/mi-info-os.exp.

gdb/testsuite:

2017-11-03  Yao Qi  <yao.qi@linaro.org>

	* gdb.mi/list-thread-groups-available.exp: Skip it if XML parsing
	in GDB is disabled.
---
 gdb/testsuite/ChangeLog                               | 5 +++++
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c718747..158fea4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2017-11-03  Yao Qi  <yao.qi@linaro.org>
 
+	* gdb.mi/list-thread-groups-available.exp: Skip it if XML parsing
+	in GDB is disabled.
+
+2017-11-03  Yao Qi  <yao.qi@linaro.org>
+
 	* gdb.python/py-thrhandle.exp: Skip it if python is not
 	enabled.
 
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index eea27b4..749ef72 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -20,6 +20,12 @@ set MIFLAGS "-i=mi"
 
 standard_testfile
 
+# Support for XML is needed to run this test.
+if [gdb_skip_xml_test] then {
+    unsupported "list-thread-groups-available.exp"
+    return -1
+}
+
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
     return -1
-- 
1.9.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-03 12:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 12:53 [PATCH OBV] Skip gdb.mi/list-thread-groups-available.exp if no xml support Yao Qi

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).