Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix gdb.cp/psymtab-parameter.exp with -readnow
@ 2020-10-27 22:17 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-10-27 22:17 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running test-case gdb.cp/psymtab-parameter.exp with target board readnow,
we run into:
...
FAIL: gdb.cp/psymtab-parameter.exp: maintenance info symtabs
...

The FAIL is expected, as mentioned in the comment:
...
 # The goal is to keep the CU (Compilation Unit) unexpanded.  It would be
 # rather XFAIL than FAIL here.  For example -readnow breaks it.
 gdb_test_no_output "maintenance info symtabs"
...

Fix the FAIL by skipping the command for -readnow.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.cp/psymtab-parameter.exp with -readnow

gdb/testsuite/ChangeLog:

2020-10-27  Tom de Vries  <tdevries@suse.de>

	* gdb.cp/psymtab-parameter.exp: Don't expect unexpanded CU for
	-readnow.

---
 gdb/testsuite/gdb.cp/psymtab-parameter.exp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
index 825e3f4a61..4253cf59ad 100644
--- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp
+++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
@@ -27,9 +27,10 @@ clean_restart $testfile.x
 # As `main' is not present GDB fails to find the proper inferior language.
 gdb_test_no_output "set language c++"
 
-# The goal is to keep the CU (Compilation Unit) unexpanded.  It would be rather
-# XFAIL than FAIL here.  For example -readnow breaks it.
-gdb_test_no_output "maintenance info symtabs"
+if { ![readnow] } {
+    # Check that the the CU (Compilation Unit) is unexpanded.
+    gdb_test_no_output "maintenance info symtabs"
+}
 
 # GDB has shown only the `long func<short>()' ELF symbol before, not the DWARF
 # symbol

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

only message in thread, other threads:[~2020-10-27 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 22:17 [committed][gdb/testsuite] Fix gdb.cp/psymtab-parameter.exp with -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