From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27496 invoked by alias); 21 Jun 2012 07:55:31 -0000 Received: (qmail 27484 invoked by uid 22791); 21 Jun 2012 07:55:28 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL 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, 21 Jun 2012 07:55:03 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1ShcEI-00053R-3Q from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 21 Jun 2012 00:55:02 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 21 Jun 2012 00:55:01 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Thu, 21 Jun 2012 00:55:00 -0700 From: Yao Qi To: Subject: [PATCH] [testsuite] Fix in board_file native-gdbserver.exp Date: Thu, 21 Jun 2012 07:55:00 -0000 Message-ID: <1340265300-4881-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain 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-06/txt/msg00652.txt.bz2 Hi, When I use following statement in test case with native-gdbserver.exp board_file, I got one error, remote_exec target "sh -c { \[ -f /bin/ls \] }" WARNING: program timed out. FAIL: gdb.base/foo.exp: exists /bin/ls Examine the verbose log shows that dejagnu thinks native-gdbserver is a remote target, and will try to use remote method, rsh for example, to access files, Executing on target: sh -c { [ -f /bin/ls ] } (timeout = 300) calling is_remote target board_info build name getting qiyao name board_info host name getting qiyao name calling is_remote native-gdbserver board_info build name getting qiyao name board_info host name getting qiyao name board_info native-gdbserver exists isremote board_info native-gdbserver isremote getting native-gdbserver isremote board is native-gdbserver, isremote is 1 This patch add new proc ${board}_exec to wrap remote_exec with setting isremote to 0 temporarily. Running test suite with native-gdbserver, no change on result. Note that such problem doesn't exist on board_file native-extended-gdbserver.exp because isremote always is set to 0 in it. gdb/testsuite: 2012-06-21 Yao Qi * boards/native-gdbserver.exp: New proc ${board}_exec. --- gdb/testsuite/boards/native-gdbserver.exp | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/boards/native-gdbserver.exp b/gdb/testsuite/boards/native-gdbserver.exp index 5fa02a4..89702df 100644 --- a/gdb/testsuite/boards/native-gdbserver.exp +++ b/gdb/testsuite/boards/native-gdbserver.exp @@ -64,6 +64,18 @@ proc ${board}_spawn { board cmd } { return $result } +proc ${board}_exec { hostname program args } { + global board_info + + set baseboard [lindex [split $hostname "/"] 0] + + set board_info($baseboard,isremote) 0 + set result [remote_exec $hostname $program $args] + set board_info($baseboard,isremote) 1 + + return $result +} + proc ${board}_download { board host dest } { return $host } -- 1.7.7.6