From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17637 invoked by alias); 29 Mar 2012 05:09:29 -0000 Received: (qmail 17627 invoked by uid 22791); 29 Mar 2012 05:09:28 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Mar 2012 05:09:15 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SD7bm-0001zM-3J from Hui_Zhu@mentor.com for gdb-patches@sourceware.org; Wed, 28 Mar 2012 22:09:14 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 28 Mar 2012 22:09:13 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Wed, 28 Mar 2012 22:09:12 -0700 Message-ID: <4F73EE77.50907@mentor.com> Date: Thu, 29 Mar 2012 05:09:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: Subject: [PATCH] testsuite: let find_gdbserver call which before return "" Content-Type: multipart/mixed; boundary="------------060801030901010409070902" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00971.txt.bz2 --------------060801030901010409070902 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 941 Hi, I got some trouble with testsuite about gdbserver for example: make check RUNTESTFLAGS="server-run.exp" It will not works because testsuite cannot get gdbserver from find_gdbserver. In the find_gdbserver, we can find that if didn't find gdbserver from GDBSERVER or gdb_server_prog, it will: set gdbserver "${GDB}server" if { [file isdirectory $gdbserver] } { append gdbserver "/gdbserver" } if { [file executable $gdbserver] } { return $gdbserver } But file executable just check the gdbserver in current work directory. So it will return "". The attachment is a patch that add some code that call "which $gdbserver" after this part. If the reply include $gdbserver and it is executable, return it. Then make check RUNTESTFLAGS="server-run.exp" can work OK now. Thanks, Hui 2012-03-29 Hui Zhu * lib/gdbserver-support.exp (find_gdbserver): Add code for which gdbserver. --------------060801030901010409070902 Content-Type: text/plain; charset="us-ascii"; name="testsuite-find_gdbserver.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="testsuite-find_gdbserver.txt" Content-length: 455 --- testsuite/lib/gdbserver-support.exp | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/testsuite/lib/gdbserver-support.exp +++ b/testsuite/lib/gdbserver-support.exp @@ -131,6 +131,15 @@ proc find_gdbserver { } { return $gdbserver } + spawn -noecho which $gdbserver + expect { + -re "$gdbserver" { + if { [file executable $expect_out(buffer)] } { + return $expect_out(buffer) + } + } + } + return "" } --------------060801030901010409070902--