public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.server/file-transfer.exp with local-remote-host.exp
Date: Tue, 18 Oct 2022 13:32:51 +0000 (GMT)	[thread overview]
Message-ID: <20221018133251.83B653858C83@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=473487c23ee1213bcba6fce37e8676eb39ab9180

commit 473487c23ee1213bcba6fce37e8676eb39ab9180
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Oct 18 15:32:46 2022 +0200

    [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.

Diff:
---
 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" \

                 reply	other threads:[~2022-10-18 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221018133251.83B653858C83@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@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).