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.
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" \