Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Hui Zhu <hui_zhu@mentor.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] testsuite tfind.exp: If current target don't support trace, try gdbserver.
Date: Thu, 29 Mar 2012 15:00:00 -0000	[thread overview]
Message-ID: <4F7478EB.7060709@redhat.com> (raw)
In-Reply-To: <4F74750F.80006@mentor.com>

On 03/29/2012 03:43 PM, Hui Zhu wrote:

> That is back to the old question I ask for, right? :)
> 
> Why the way try to make the trace function of GDB more easy be tested is not you want.

>

> And this way didn't affect current test.


We're going in circles.  I already explained why.  But let me try one last time.
We spawn the testsuite against a given target.  It's wrong to run _some_ tests
against _yet another_ target if not that first one.  The gdb.server/ tests are
special, and most scheduled for removal, exactly due to this issue.

The trace function of GDB is not special compared to any other feature not
supported by the native debugger.  If you spawn a test run to test the native
debugger, that's all that should be tested, with the features it doesn't support
skipped.  If you spawn a test run to test the sim, that's all that should be
tested, with the features it doesn't support skipped.  If you spawn a test run
to test a remote qemu, that's all that should be tested, with the features
it doesn't support skipped.  If you spawn a test run to test a gdbserver, that's
all that should be tested, with the features it doesn't support skipped.

People should already be testing routinely against both the native
target, and gdbserver.

So the benefits of leaving the test run to test the target that it is meant
to test should be obvious.  So, no, I'll strongly object to such patches.

Another example, imagine if native debugging already supported tracing, but then
some patch inadvertently broke that, but then the test harness spawns gdbserver
when the native target says "sorry I can't to tracing", and the test runs
against gdbserver instead.  You'd be masking the bug...

If you want to make things easier, make it simpler to run the testsuite
against the just built gdbserver, without having to install the
native-gdbserver.exp (and friends) board files elsewhere, for example, with
a new makefile target ('make check-gdbserver' or some such), that points SITE
at an site.exp in the GDB source tree, that picks up the board
files under src/gdb/testsuite/boards.

-- 
Pedro Alves


  reply	other threads:[~2012-03-29 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29  9:18 Hui Zhu
2012-03-29  9:24 ` Pedro Alves
2012-03-29  9:29   ` Hui Zhu
2012-03-29  9:46     ` Pedro Alves
2012-03-29 14:02       ` Hui Zhu
2012-03-29 14:13         ` Pedro Alves
2012-03-29 14:23           ` Hui Zhu
2012-03-29 14:26             ` Pedro Alves
2012-03-29 14:39               ` Hui Zhu
2012-03-29 14:40                 ` Pedro Alves
2012-03-29 14:43                   ` Hui Zhu
2012-03-29 15:00                     ` Pedro Alves [this message]
2012-03-29 15:27                       ` Hui Zhu

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=4F7478EB.7060709@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hui_zhu@mentor.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