public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.fortran/call-no-debug.exp with native-gdbserver
@ 2021-10-13  9:36 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-10-13  9:36 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=38b03d23c7c7e6a9f8f27a9899fd0a84587c379e

commit 38b03d23c7c7e6a9f8f27a9899fd0a84587c379e
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Oct 13 11:36:02 2021 +0200

    [gdb/testsuite] Fix gdb.fortran/call-no-debug.exp with native-gdbserver
    
    When running test-case gdb.fortran/call-no-debug.exp with target board
    native-gdbserver, I run into:
    ...
    (gdb) PASS: gdb.fortran/call-no-debug.exp: print string_func_ (&'abcdefg', 3)
    call (integer) string_func_ (&'abcdefg', 3)^M
    $2 = 0^M
    (gdb) FAIL: gdb.fortran/call-no-debug.exp: call (integer) string_func_ (&'abcdefg', 3)
    ...
    
    The problem is that gdb_test is used to match inferior output.
    
    Fix this by using gdb_test_stdio.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.fortran/call-no-debug.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp
index 3c5172e7e36..cbdefb6a7d9 100644
--- a/gdb/testsuite/gdb.fortran/call-no-debug.exp
+++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp
@@ -102,5 +102,7 @@ if { $symbol_name == "" } {
     gdb_test "ptype ${symbol_name}" "type = <unknown return type> \\(\\)"
     gdb_test "print ${symbol_name} (&'abcdefg', 3)" \
 	"'${symbol_name}' has unknown return type; cast the call to its declared return type"
-    gdb_test "call (integer) ${symbol_name} (&'abcdefg', 3)" " abc\r\n\\\$\\d+ = 0"
+    gdb_test_stdio "call (integer) ${symbol_name} (&'abcdefg', 3)" \
+	" abc" \
+	"\\\$\\d+ = 0"
 }


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

only message in thread, other threads:[~2021-10-13  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  9:36 [binutils-gdb] [gdb/testsuite] Fix gdb.fortran/call-no-debug.exp with native-gdbserver 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).