From patchwork Tue Apr 28 10:03:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 6474 Received: (qmail 85867 invoked by alias); 28 Apr 2015 10:03:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 85853 invoked by uid 89); 28 Apr 2015 10:03:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f45.google.com Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 28 Apr 2015 10:03:51 +0000 Received: by pabtp1 with SMTP id tp1so159828676pab.2 for ; Tue, 28 Apr 2015 03:03:49 -0700 (PDT) X-Received: by 10.70.128.9 with SMTP id nk9mr30615033pdb.58.1430215429322; Tue, 28 Apr 2015 03:03:49 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ol3sm13025973pbb.70.2015.04.28.03.03.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 Apr 2015 03:03:47 -0700 (PDT) From: Yao Qi To: Sergio Durigan Junior Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] A new board file remote-gdbserver-on-localhost.exp References: <1429796515-26821-1-git-send-email-qiyaoltc@gmail.com> <87zj5xco4s.fsf@redhat.com> Date: Tue, 28 Apr 2015 11:03:44 +0100 In-Reply-To: <87zj5xco4s.fsf@redhat.com> (Sergio Durigan Junior's message of "Fri, 24 Apr 2015 15:38:59 -0400") Message-ID: <86vbggwovz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Sergio Durigan Junior 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. 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