From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 2/6] [gdb/testsuite] Fix gdb.server/file-transfer.exp for remote host
Date: Tue, 28 Mar 2023 17:48:51 +0200 [thread overview]
Message-ID: <20230328154855.32238-3-tdevries@suse.de> (raw)
In-Reply-To: <20230328154855.32238-1-tdevries@suse.de>
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.
---
gdb/testsuite/gdb.server/file-transfer.exp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index 05da514413c..5e273350f90 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 {
--
2.35.3
next prev parent reply other threads:[~2023-03-28 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 15:48 [pushed 0/6] [gdb/testsuite] Fix gdb.server " Tom de Vries
2023-03-28 15:48 ` [pushed 1/6] [gdb/testsuite] Fix local-remote-host-native.exp for gdb.server tests Tom de Vries
2023-03-28 15:48 ` Tom de Vries [this message]
2023-03-28 15:48 ` [pushed 3/6] [gdb/testsuite] Fix gdb.server/solib-list.exp for remote host Tom de Vries
2023-03-28 15:48 ` [pushed 4/6] [gdb/testsuite] Require non-remote host for gdb.server/multi-ui-errors.exp Tom de Vries
2023-03-28 15:48 ` [pushed 5/6] [gdb/testsuite] Fix gdb.server/sysroot.exp for remote host Tom de Vries
2023-03-28 15:48 ` [pushed 6/6] [gdb/testsuite] Fix gdb.server/server-kill-python.exp " Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230328154855.32238-3-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).