aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-23 12:27:36 -0600
committerTom Tromey <tromey@redhat.com>2013-11-04 11:02:09 -0700
commit479c8d686e8b76802c2548708f939e014ebbe13c (patch)
tree1fe0e9f0a7da591019c864e562d0d650966af540 /gdb/testsuite/gdb.server
parent1e537771557f684cafb8247ad4ec03d38ac4deb5 (diff)
downloadgdb-479c8d686e8b76802c2548708f939e014ebbe13c.zip
gdb-479c8d686e8b76802c2548708f939e014ebbe13c.tar.gz
gdb-479c8d686e8b76802c2548708f939e014ebbe13c.tar.bz2
fix up gdb.server
This fixes gdb.server to be parallel-safe. 2013-11-04 Tom Tromey <tromey@redhat.com> * gdb.server/file-transfer.exp: Use standard_output_file.
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r--gdb/testsuite/gdb.server/file-transfer.exp21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index aa56380..841d757 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -35,15 +35,22 @@ gdb_test "disconnect" ".*"
gdbserver_run ""
proc test_file_transfer { filename description } {
- gdb_test "remote put \"$filename\" down-server" \
+ 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]
+ set down_server [standard_output_file $down_server]
+ }
+
+ gdb_test "remote put \"$filename\" $down_server" \
"Successfully sent .*" "put $description"
- gdb_test "remote get down-server up-server" \
+ gdb_test "remote get $down_server $up_server" \
"Successfully fetched .*" "get $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 host "cmp -s $filename $down_server"]
if { [lindex $result 0] == 0 } {
pass "compare intermediate $description"
} else {
@@ -51,25 +58,25 @@ proc test_file_transfer { filename description } {
}
}
- set result [remote_exec host "cmp -s $filename up-server"]
+ set result [remote_exec host "cmp -s $filename $up_server"]
if { [lindex $result 0] == 0 } {
pass "compare $description"
} else {
fail "compare $description"
}
- gdb_test "remote delete down-server" \
+ gdb_test "remote delete $down_server" \
"Successfully deleted .*" "deleted $description"
if { ![is_remote target] } {
- if { ! [remote_file target exists down-server] } {
+ if { ! [remote_file target exists $down_server] } {
pass "verified deleted $description"
} else {
fail "verified deleted $description"
}
}
- catch { file delete up-server }
+ catch { file delete $up_server }
}
test_file_transfer "$binfile" "binary file"