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] Remove REMOTE_PORTNUM in remote-stdio-gdbserver.exp
Date: Sat, 29 Oct 2022 07:20:39 +0000 (GMT)	[thread overview]
Message-ID: <20221029072039.CC59A3858D32@sourceware.org> (raw)

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

commit 488ed354c8514ba93286f8676a64b7841bb1fda4
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Oct 29 09:20:36 2022 +0200

    [gdb/testsuite] Remove REMOTE_PORTNUM in remote-stdio-gdbserver.exp
    
    The usage for board remote-stdio-gdbserver.exp is advertised as:
    ...
     # bash$ make check RUNTESTFLAGS="--target_board=remote-stdio-gdbserver \
     #    REMOTE_USERNAME=... REMOTE_HOSTNAME=... REMOTE_PORTNUM=... \
     #    [REMOTE_TMPDIR=${remote_dir}] [GDBSERVER=${remote_gdbserver}]"
    ...
    but when adding REMOTE_PORTNUM=22, I run into:
    ...
    Running stop-reply-no-thread-multi.exp ...
    ERROR: tcl error sourcing stop-reply-no-thread-multi.exp.
    ERROR: couldn't execute "/usr/bin/ssh -p22": no such file or directory
        while executing
    "builtin_spawn {/usr/bin/ssh -p22} -l vries localhost {/usr/bin/gdbserver \
      --once localhost:2346 \
      /home/vries/gdb_versions/devel/build/gdb/testsuite/outp..."
    ...
    
    Fix this by simply removing REMOTE_PORTNUM.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/boards/remote-stdio-gdbserver.exp | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/boards/remote-stdio-gdbserver.exp b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
index 101f1ee8098..e1a2d0ed007 100644
--- a/gdb/testsuite/boards/remote-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
@@ -21,7 +21,7 @@
 # To use this file:
 # bash$ cd ${build_dir}/gdb
 # bash$ make check RUNTESTFLAGS="--target_board=remote-stdio-gdbserver \
-#    REMOTE_USERNAME=... REMOTE_HOSTNAME=... REMOTE_PORTNUM=... \
+#    REMOTE_USERNAME=... REMOTE_HOSTNAME=... \
 #    [REMOTE_TMPDIR=${remote_dir}] [GDBSERVER=${remote_gdbserver}]"
 
 load_board_description "stdio-gdbserver-base"
@@ -39,17 +39,8 @@ if [info exists REMOTE_HOSTNAME] {
     set_board_info hostname unspecified_hostname
 }
 
-# The two programs have different syntax to set the remote port, so
-# set it as part of the program name rather than in get_remote_login.
-
-if [info exists REMOTE_PORTNUM] {
-    set_board_info portnum $REMOTE_PORTNUM
-    set_board_info rsh_prog "/usr/bin/ssh -p$REMOTE_PORTNUM"
-    set_board_info rcp_prog "/usr/bin/scp -P$REMOTE_PORTNUM"
-} else {
-    set_board_info rsh_prog /usr/bin/ssh
-    set_board_info rcp_prog /usr/bin/scp
-}
+set_board_info rsh_prog /usr/bin/ssh
+set_board_info rcp_prog /usr/bin/scp
 
 # Some remote machines don't have writable home directories.
 if [info exists REMOTE_TMPDIR] {

                 reply	other threads:[~2022-10-29  7:20 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=20221029072039.CC59A3858D32@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).