From 473487c23ee1213bcba6fce37e8676eb39ab9180 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 18 Oct 2022 15:32:46 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.server/file-transfer.exp with local-remote-host.exp When running test-case gdb.server/file-transfer.exp with host board local-remote-host.exp, I get: ... Executing on host: cmp -s $outputs/gdb.server/file-transfer/file-transfer \ down-server (timeout = 300) builtin_spawn [open ...]^M XYZ2ZYX FAIL: gdb.server/file-transfer.exp: compare intermediate binary file ... The remote host and remote target cases are handled here together here in proc test_file_transfer: ... if {![is_remote host] && ![is_remote target]} { set up_server [standard_output_file $up_server] set down_server [standard_output_file $down_server] } ... Fix this by handling them separately. Tested on x86_64-linux. --- gdb/testsuite/gdb.server/file-transfer.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp index 80d61a0f506..310effd44b6 100644 --- a/gdb/testsuite/gdb.server/file-transfer.exp +++ b/gdb/testsuite/gdb.server/file-transfer.exp @@ -37,11 +37,15 @@ gdbserver_run "" proc test_file_transfer { filename description } { set up_server up-server set down_server down-server - if {![is_remote host] && ![is_remote target]} { - set up_server [standard_output_file $up_server] + + if {![is_remote target]} { set down_server [standard_output_file $down_server] } + if {![is_remote host]} { + set up_server [standard_output_file $up_server] + } + gdb_test "remote put \"$filename\" $down_server" \ "Successfully sent .*" "put $description" gdb_test "remote get $down_server $up_server" \ -- 2.30.2