From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26209 invoked by alias); 18 Jan 2013 02:07:31 -0000 Received: (qmail 25906 invoked by uid 22791); 18 Jan 2013 02:07:29 -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; Fri, 18 Jan 2013 02:07:24 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Tw1MY-0005wn-En from Yao_Qi@mentor.com ; Thu, 17 Jan 2013 18:07:22 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 17 Jan 2013 18:07:22 -0800 Received: from qiyao.dyndns.org (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; Thu, 17 Jan 2013 18:07:21 -0800 Message-ID: <50F8AE32.9020206@codesourcery.com> Date: Fri, 18 Jan 2013 02:07: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> <50F67844.5040007@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/msg00399.txt.bz2 On 01/18/2013 09:22 AM, Hui Zhu wrote: >> 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} > ERROR: tcl error sourcing ../../../gdb/gdb/testsuite/gdb.trace/ctf.exp. > ERROR: bad spawn_id (process died earlier?) > > This is what I got. Looks Tom encountered this error before and it was discussed here I think you get an error in this line remote_exec host "babeltrace $ctfdir < /dev/null" "" "" "output" as mentioned in the link above, this line should work, remote_exec host "babeltrace $ctfdir < /dev/null" "" "/dev/null" "output" or remote_exec host "babeltrace $ctfdir" "" "/dev/null" "output" This approach is used in proc run in gdb/testsuite/gdb.base/gnu-debugdata.exp. > >> > >> > 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. > Thanks. I am very clear about this way. Do you mind I keep current > way that I just used? > If the existing method to fix 'remote_exec host' errors (mentioned above) still doesn't work, I don't mind using your approach, although I didn't read it carefully. Or we can skip it in remote host? I have no comments on this patch. I am not the maintainer to approve or reject the patches, and all my comments are optional. Please feel free to "cherry-pick" useful ones. -- Yao (齐尧)