public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix gdb.fortran "failed to extract expected results" errors
@ 2022-02-24 17:41 Keith Seitz
  2022-02-25 16:40 ` Tom Tromey
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2022-02-24 17:41 UTC (permalink / raw)
  To: gdb-patches

When running the gdb.fortran tests array-slices.exp and lbound-ubound.exp,
the test suite throws several ERRORs on native-gdbserver/-m{32,64},
and native-extended-gdbsever/-m{32,64}:

[on native-extended-gdbserver/-m64]
Running /home/keiths/work/gdb/branches/testsuite-errors/linux/gdb/testsuite/../../../src/gdb/testsuite/gdb.fortran/array-slices.exp ...
ERROR: failed to extract expected results
ERROR: failed to extract expected results
Running /home/keiths/work/gdb/branches/testsuite-errors/linux/gdb/testsuite/../../../src/gdb/testsuite/gdb.fortran/lbound-ubound.exp ...
ERROR: failed to extract expected results for lbound

This occurs because the tests require inferior I/O which we do not have
access to while using these targets.

This patch skips these tests when running on non-native targets.
---
 gdb/testsuite/gdb.fortran/array-slices.exp  | 6 ++++++
 gdb/testsuite/gdb.fortran/lbound-ubound.exp | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp
index 5a909812fe3..8f9c012e399 100644
--- a/gdb/testsuite/gdb.fortran/array-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices.exp
@@ -62,6 +62,12 @@ proc run_test { repack } {
 	return -1
     }
 
+    # This test relies on output from the inferior and is not supported on
+    # remote targets.
+    if {![gdb_is_target_native]} {
+	return 0
+    }
+
     # Avoid libc symbols, in particular the 'array' type.
     gdb_test_no_output "nosharedlibrary"
 
diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
index 51dd3818499..671b251c799 100644
--- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
+++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
@@ -32,6 +32,12 @@ if ![fortran_runto_main] {
     return -1
 }
 
+# This test relies on output from the inferior and is not supported on
+# remote targets.
+if {![gdb_is_target_native]} {
+   return 0
+}
+
 # Avoid libc symbols, in particular the 'array' type.
 gdb_test_no_output "nosharedlibrary"
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-09 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 17:41 [PATCH] Fix gdb.fortran "failed to extract expected results" errors Keith Seitz
2022-02-25 16:40 ` Tom Tromey
2022-02-25 16:48   ` Simon Marchi
2022-02-28 15:35     ` Keith Seitz
2022-03-03 20:02       ` Pedro Alves
2022-03-07 14:27         ` [PATCH] Make gdb.fortran/{array-slices,lbound-ubound} work against gdbserver Pedro Alves
2022-03-09 17:21           ` Tom Tromey

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