diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-28 17:48:35 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-28 17:48:35 +0200 |
commit | 81f5b5156f3235c323e636c71eeaea730a4d41ad (patch) | |
tree | 13a4e260e27dab0f264d3c0e6757c7b2cc121aef | |
parent | 9121a23fa7294542d022c25eda0fe8b9e92c3b59 (diff) | |
download | gdb-81f5b5156f3235c323e636c71eeaea730a4d41ad.zip gdb-81f5b5156f3235c323e636c71eeaea730a4d41ad.tar.gz gdb-81f5b5156f3235c323e636c71eeaea730a4d41ad.tar.bz2 |
[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.
-rw-r--r-- | gdb/testsuite/gdb.server/file-transfer.exp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp index 05da514..5e27335 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 { |