[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.
This commit is contained in:
Tom de Vries 2022-10-29 09:20:36 +02:00
parent dd6c5a9217
commit 488ed354c8

View 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] {