From 81f5b5156f3235c323e636c71eeaea730a4d41ad Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 28 Mar 2023 17:48:35 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.server/file-transfer.exp for remote host Fix test-case gdb.server/file-transfer.exp for remote host using gdb_remote_download and host_standard_output_file. Tested on x86_64-linux. --- gdb/testsuite/gdb.server/file-transfer.exp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp index 05da514413c..5e273350f90 100644 --- a/gdb/testsuite/gdb.server/file-transfer.exp +++ b/gdb/testsuite/gdb.server/file-transfer.exp @@ -33,6 +33,8 @@ gdb_test "disconnect" ".*" gdbserver_run "" proc test_file_transfer { filename description } { + set host_filename [gdb_remote_download host $filename] + set up_server up-server set down_server down-server @@ -40,11 +42,9 @@ proc test_file_transfer { filename description } { set down_server [standard_output_file $down_server] } - if {![is_remote host]} { - set up_server [standard_output_file $up_server] - } + set up_server [host_standard_output_file $up_server] - gdb_test "remote put \"$filename\" $down_server" \ + gdb_test "remote put \"$host_filename\" $down_server" \ "Successfully sent .*" "put $description" gdb_test "remote get $down_server $up_server" \ "Successfully fetched .*" "get $description" @@ -52,7 +52,7 @@ proc test_file_transfer { filename description } { if { ![is_remote target] } { # If we can check the target copy of the file, do that too. # This should catch symmetric errors in upload and download. - set result [remote_exec host "cmp -s $filename $down_server"] + set result [remote_exec build "cmp -s $filename $down_server"] if { [lindex $result 0] == 0 } { pass "compare intermediate $description" } else { @@ -60,7 +60,7 @@ proc test_file_transfer { filename description } { } } - set result [remote_exec host "cmp -s $filename $up_server"] + set result [remote_exec host "cmp -s $host_filename $up_server"] if { [lindex $result 0] == 0 } { pass "compare $description" } else { -- 2.30.2