[gdb/testsuite] Remove REMOTE_PORTNUM in remote-stdio-gdbserver.exp
authorTom de Vries <tdevries@suse.de>
Sat, 29 Oct 2022 07:20:36 +0000 (09:20 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 29 Oct 2022 07:20:36 +0000 (09:20 +0200)
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.

gdb/testsuite/boards/remote-stdio-gdbserver.exp

index 101f1ee809846a41d3004bbd7276f5d4ba1309be..e1a2d0ed00746ac642793443c8595262088b1c13 100644 (file)
@@ -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] {