[gdb/testsuite] Fix gdb.fortran/nested-funcs-2.exp with gdbserver
authorTom de Vries <tdevries@suse.de>
Thu, 14 May 2020 15:24:49 +0000 (17:24 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 14 May 2020 15:24:49 +0000 (17:24 +0200)
When running test-case gdb.fortran/nested-funcs-2.exp with target board
native-gdbserver, we have:
...
(gdb) call contains_keyword::subroutine_to_call()^M
(gdb) FAIL: gdb.fortran/nested-funcs-2.exp: src_prefix=0: nest_prefix=1: \
  call contains_keyword::subroutine_to_call()
...

This is caused by the fact that we're trying to match inferior output using
gdb_test.

Fix this by using gdb_test_stdio instead.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-05-14  Tom de Vries  <tdevries@suse.de>

* gdb.fortran/nested-funcs-2.exp: Use gdb_test_stdio to test inferior
output.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/nested-funcs-2.exp

index 5f1b04f6c349846e4e27e8ca21b2618d4911e08a..6c025832e3bbc662a1bf2b3e2c3f8d2da17a6bb5 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-14  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.fortran/nested-funcs-2.exp: Use gdb_test_stdio to test inferior
+       output.
+
 2020-05-14  Tom de Vries  <tdevries@suse.de>
 
        * gdb.base/align.exp: Split into ...
index 724be74ff8801174b755bedcad1c2463780b7c12..4e517bba2fef27aff0f9aca60320a603f06cd234 100644 (file)
@@ -89,7 +89,7 @@ proc do_bp_tests {with_src_prefix_p with_nest_prefix_p} {
 
     # Call a contained function.
     if { ${with_nest_prefix_p} } {
-       gdb_test "call ${nest_prefix}subroutine_to_call()" " called"
+       gdb_test_stdio "call ${nest_prefix}subroutine_to_call()" " called" ""
     }
 
     # Break on another contained function and run to it.