Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Skip gdb.base/readnever.exp with target board readnow
@ 2020-04-23  7:26 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-04-23  7:26 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running test-case gdb.base/readnever.exp with target board readnow, we
have:
...
spawn gdb -nw -nx -data-directory data-directory -ex set sysroot -readnow \
  --readnever^M
gdb: '--readnow' and '--readnever' cannot be specified simultaneously^M
ERROR: : spawn id exp19 not open
...

Fix this by skipping the test when -readnow/--readnow is detected in
GDBFLAGS.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Skip gdb.base/readnever.exp with target board readnow

gdb/testsuite/ChangeLog:

2020-04-23  Tom de Vries  <tdevries@suse.de>

	* gdb.base/readnever.exp: Skip if GDBFLAGS contain -readnow/--readnow.

---
 gdb/testsuite/gdb.base/readnever.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index 737bc84e848..ab2e18e2260 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -20,6 +20,13 @@ if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
     return -1
 }
 
+# See if we have target board readnow.exp or similar.
+if { [lsearch -exact $GDBFLAGS -readnow] != -1 \
+	 || [lsearch -exact $GDBFLAGS --readnow] != -1 } {
+    untested "--readnever not allowed in combination with --readnow"
+    return -1
+}
+
 save_vars { GDBFLAGS } {
     append GDBFLAGS " --readnever"
     clean_restart ${binfile}


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

only message in thread, other threads:[~2020-04-23  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23  7:26 [committed][gdb/testsuite] Skip gdb.base/readnever.exp with target board readnow Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox