diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 25df82b4e7..24955f6530 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-05-22 Pedro Alves + + * gdb.base/remote.exp: Only gdb_start after compiling the + testcase. Issue "disconnect" before testing "set remote" command + defaults. Issue clean_restart before running to main. + 2018-05-22 Pedro Alves * gdb.base/remote.exp: Adjust expected output of "show remote diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp index ba34441af2..edcfac824f 100644 --- a/gdb/testsuite/gdb.base/remote.exp +++ b/gdb/testsuite/gdb.base/remote.exp @@ -21,14 +21,17 @@ if {[target_info gdb_protocol] != "remote" standard_testfile .c -gdb_start - set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] if {$result != "" } then { untested "failed to compile" return -1 } +gdb_start + +# Make sure we're disconnected, in case we're testing with an +# extended-remote board, therefore already connected. +gdb_test "disconnect" ".*" # # Part ONE: Check the down load commands @@ -126,6 +129,8 @@ proc gdb_load_timed {executable class writesize} { pass $test } +clean_restart $binfile + # These download tests won't actually download anything on !is_remote # target boards, but we run them anyway because it's simpler, and # harmless.