From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22911 invoked by alias); 16 Jan 2013 09:52:58 -0000 Received: (qmail 22903 invoked by uid 22791); 16 Jan 2013 09:52:57 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,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; Wed, 16 Jan 2013 09:52:51 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TvPft-0003KU-KP from Yao_Qi@mentor.com ; Wed, 16 Jan 2013 01:52:49 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 Jan 2013 01:52:49 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Wed, 16 Jan 2013 01:52:48 -0800 Message-ID: <50F67844.5040007@codesourcery.com> Date: Wed, 16 Jan 2013 09:52:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Hui Zhu CC: Joel Brobecker , gdb-patches ml , Tom Tromey Subject: Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function References: <50F3ADB8.1000603@codesourcery.com> <50F55E11.40008@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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: 2013-01/txt/msg00331.txt.bz2 On 01/16/2013 03:38 PM, Hui Zhu wrote: > make check RUNTESTFLAGS="--target_board=native-gdbserver ctf.exp" > remote_exec host "babeltrace $ctfdir < /dev/null" "" "" "output" will > get error. I think that is why gas_version have "if [is_remote host]" > for that. What is the error? 'remote_exec host' has been used in some places in gdb testsuite so it should work well. The one-line statement below works with combinations of {remote-host, local-host} x {babeltrace installed, babeltrace not installed} set ctfdir "foo" set status [remote_exec host "babeltrace $ctfdir < /dev/null"] verbose -log "status\[0\] ([lindex $status 0])" verbose -log "status\[1\] ([lindex $status 1])" 1) babeltrace installed (local-host and remote-host). We'll get, status[0] (1) status[1] ([error] opening trace "foo" for reading. 2) babeltrace not installed, local-host. We'll get, status[0] (-1) status[1] (spawn failed) 3) babeltrace not installed, remote-host. We'll get, status[0] (1) status[1] (sh: babeltrace: command not found) We can match 'status[1]' to know the different results of executing 'babeltrace' on host. P.S. I am not good at tcl/expect, so I may miss something. -- Yao (齐尧)