A new board file remote-gdbserver-on-localhost.exp

Message ID 86vbggwovz.fsf@gmail.com
State New, archived
Headers

Commit Message

Yao Qi April 28, 2015, 10:03 a.m. UTC
  Sergio Durigan Junior <sergiodj@redhat.com> writes:

> While using your board file to try to reproduce the failure, I found
> that it can stale on:
>
>   (gdb) spawn /usr/bin/ssh -l user localhost
>   /path/to/gdb/build-original/gdb/testsuite/../gdbserver/gdbserver --once :2346
>   /path/to/gdb/build-original/gdb/testsuite/gdb.base/coredump-filter
>   The authenticity of host 'localhost (::1)' can't be established.
>   ECDSA key fingerprint is xx:xx:xx:xx:xx:xx.
>   Are you sure you want to continue connecting (yes/no)?
>   got a INT signal, interrupted by user
>
> It also can stale if the user needs to provide a password to log into
> the system (which normally is the case).  BTW, how do you use the board
> in this case?

You need to use the right private key to access localhost without typing
password or passphrase.  In your ~/.ssh/config,

Host localhost
        IdentityFile ~/.ssh/id_rsa_phraseless
Host 127.0.0.1
        IdentityFile ~/.ssh/id_rsa_phraseless

>
> *And* it also assumes that the user will have a sshd running on
> localhost, which is not always the case, right?
>

Well, it is reasonable to have sshd running on a gdb dev box.

> So maybe the board could check for those cases and act accordingly, or
> at least the introductory comments on the board file could be extended
> to mention those situations.

Yes, I've added some comments into it.
  

Comments

Yao Qi June 22, 2015, 1:02 p.m. UTC | #1
Yao Qi <qiyaoltc@gmail.com> writes:

> From: Yao Qi <yao.qi@linaro.org>
> Date: Tue, 28 Apr 2015 10:59:04 +0100
> Subject: [PATCH] Add comments on using board file  remote-gdbserver-on-localhost.exp
>
> This commit is to add comments on using this board file and the
> requirements on localhost.
>
> gdb/testsuite:
>
> 2015-04-28  Yao Qi  <yao.qi@linaro.org>
>
> 	* boards/remote-gdbserver-on-localhost.exp: Add comments.

I've pushed it in.
  

Patch

diff --git a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp
index 6a42b90..138782c 100644
--- a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp
+++ b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp
@@ -27,6 +27,9 @@  set_board_info compiler  "[find_gcc]"
 
 process_multilib_options ""
 
+# The sshd should be running on localhost and ssh key should be
+# correctly set up that you ssh to localhost without having to type
+# password.
 set_board_info rcp_prog "/usr/bin/scp"
 set_board_info rsh_prog "/usr/bin/ssh"
 set_board_info protocol standard