Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Hui Zhu <teawater@gmail.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	gdb-patches ml	<gdb-patches@sourceware.org>,
	Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function
Date: Wed, 16 Jan 2013 09:52:00 -0000	[thread overview]
Message-ID: <50F67844.5040007@codesourcery.com> (raw)
In-Reply-To: <CANFwon2auJH47FLg8yZPpL6=60db_ZYmbjCEa2_9LfqEDAj2pw@mail.gmail.com>

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 (齐尧)


  reply	other threads:[~2013-01-16  9:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14  3:49 Hui Zhu
2013-01-14 12:44 ` Yao Qi
2013-01-15 11:19   ` Hui Zhu
2013-01-15 13:49     ` Yao Qi
2013-01-16  7:39       ` Hui Zhu
2013-01-16  9:52         ` Yao Qi [this message]
2013-01-18  1:23           ` Hui Zhu
2013-01-18  2:07             ` Yao Qi
2013-01-18 15:28             ` Tom Tromey
2013-01-25 11:10               ` Hui Zhu
2013-02-11 12:55                 ` Hui Zhu
2013-02-18 10:39                 ` Yao Qi
2013-02-19  6:57                   ` Hui Zhu
2013-01-14 13:30 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F67844.5040007@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox