From 782e0bf46a84f57139f25c31c2ffc93508f07ef5 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 6 Aug 2015 23:38:51 +0100 Subject: [PATCH] Fix gdb.base/valgrind-infcall.exp with the native-extended-gdbserver board This test fails with --target_board=native-extended-gdbserver because it misses the usual "disconnect": (gdb) target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=30454 Already connected to a remote target. Disconnect? (y or n) n Still connected. (gdb) FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb (got interactive prompt) gdb/testsuite/ChangeLog: 2015-08-06 Pedro Alves * gdb.base/valgrind-infcall.exp: Issue a "disconnect". --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/valgrind-infcall.exp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index eccdddb46c2..e4be76eb0b5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-08-06 Pedro Alves + + * gdb.base/valgrind-infcall.exp: Issue a "disconnect". + 2015-08-06 Pedro Alves PR gdb/18749 diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index b835c67698d..6e2460b2adb 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -83,6 +83,11 @@ unset_board_info fileid clean_restart $testfile +# Make sure we're disconnected, in case we're testing with the +# native-extended-gdbserver board, where gdb_start/gdb_load spawn +# gdbserver and connect to it. +gdb_test "disconnect" ".*" + gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb" gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*" -- 2.30.2