--- testsuite/gdb.trace/tfind.exp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) --- a/testsuite/gdb.trace/tfind.exp +++ b/testsuite/gdb.trace/tfind.exp @@ -36,10 +36,25 @@ gdb_test "tfind none" ".*" "" runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { - unsupported "Current target does not support trace" - return 1; +if ![gdb_target_supports_trace] { + load_lib gdbserver-support.exp + clean_restart $testfile + + if { [skip_gdbserver_tests] } { + unsupported "target does not support trace" + return -1; + } + + gdb_test "disconnect" ".*" + + gdbserver_run "" + gdb_reinitialize_dir $srcdir/$subdir + + if ![gdb_target_supports_trace] { + unsupported "target does not support trace" + return -1; + } } # If testing on a remote host, download the source file.