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.
This commit is contained in:
parent
1e53777155
commit
479c8d686e
@ -1,3 +1,7 @@
|
|||||||
|
2013-11-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* gdb.server/file-transfer.exp: Use standard_output_file.
|
||||||
|
|
||||||
2013-11-04 Tom Tromey <tromey@redhat.com>
|
2013-11-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.base/fullname.exp: Use standard_output_file,
|
* gdb.base/fullname.exp: Use standard_output_file,
|
||||||
|
@ -35,15 +35,22 @@ gdb_test "disconnect" ".*"
|
|||||||
gdbserver_run ""
|
gdbserver_run ""
|
||||||
|
|
||||||
proc test_file_transfer { filename description } {
|
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"
|
"Successfully sent .*" "put $description"
|
||||||
gdb_test "remote get down-server up-server" \
|
gdb_test "remote get $down_server $up_server" \
|
||||||
"Successfully fetched .*" "get $description"
|
"Successfully fetched .*" "get $description"
|
||||||
|
|
||||||
if { ![is_remote target] } {
|
if { ![is_remote target] } {
|
||||||
# If we can check the target copy of the file, do that too.
|
# If we can check the target copy of the file, do that too.
|
||||||
# This should catch symmetric errors in upload and download.
|
# 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 } {
|
if { [lindex $result 0] == 0 } {
|
||||||
pass "compare intermediate $description"
|
pass "compare intermediate $description"
|
||||||
} else {
|
} 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 } {
|
if { [lindex $result 0] == 0 } {
|
||||||
pass "compare $description"
|
pass "compare $description"
|
||||||
} else {
|
} else {
|
||||||
fail "compare $description"
|
fail "compare $description"
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_test "remote delete down-server" \
|
gdb_test "remote delete $down_server" \
|
||||||
"Successfully deleted .*" "deleted $description"
|
"Successfully deleted .*" "deleted $description"
|
||||||
|
|
||||||
if { ![is_remote target] } {
|
if { ![is_remote target] } {
|
||||||
if { ! [remote_file target exists down-server] } {
|
if { ! [remote_file target exists $down_server] } {
|
||||||
pass "verified deleted $description"
|
pass "verified deleted $description"
|
||||||
} else {
|
} else {
|
||||||
fail "verified deleted $description"
|
fail "verified deleted $description"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
catch { file delete up-server }
|
catch { file delete $up_server }
|
||||||
}
|
}
|
||||||
|
|
||||||
test_file_transfer "$binfile" "binary file"
|
test_file_transfer "$binfile" "binary file"
|
||||||
|
Loading…
Reference in New Issue
Block a user