From 488ed354c8514ba93286f8676a64b7841bb1fda4 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 29 Oct 2022 09:20:36 +0200 Subject: [PATCH] [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. --- 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] { -- 2.30.2