From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
Date: Thu, 23 Feb 2017 15:43:00 -0000 [thread overview]
Message-ID: <713c3608-ff65-a940-13d1-afd4da53700c@redhat.com> (raw)
In-Reply-To: <dcc9c38f-7da5-62b6-35dc-7cf8d0d6d803@codesourcery.com>
On 02/23/2017 03:10 PM, Luis Machado wrote:
> On 02/23/2017 08:54 AM, Pedro Alves wrote:
>> On 02/23/2017 02:47 PM, Luis Machado wrote:
>>
>>> I still think it doesn't make much sense to run these tests if we're not
>>> sure gcore will support them.
>>
>> I don't understand what you're saying. We can't be sure up
>> front. The "gcore" that is run is GDB's "gcore" command. If that
>> doesn't work, gdb_gcore_cmd calls unsupported, and the rest of the
>> testcase is skipped.
>>
>
> The point is that we are indeed sure this isn't supported, unless we
> officially support core files on bare-metal targets (i don't think we
> do).
There's been talks / patches about adding that for years.
Unfortunately it hasn't happened yet, but I think it'd
be quite reasonable to have.
> See below.
Note your patch did not skip the test on bare metal targets.
That's not even what the subject says. You've skipped it
everywhere but Linux. It's not quite the same thing.
>
>>> They may run a few early tests/setup
>>> tests, but that won't translate into meaningful PASSes. But i'm ok
>>> keeping it as-is if others think the early test PASSes are useful.
>>
>> Looks like it's been useful to catch a startup code problem. ;-)
>
> Don't you agree this is a clear sign we are really testing something
> else other than core file support?
Not really. It's a sign that the test is missing a predicate, but
it's not "cores work", IMO. The testcase has a few requirements.
At least:
#1 - PIEs make sense for this target.
#2 - gcore works
To me this is a clear sign a predicate for #1 is missing.
We already detect #2. Other tests build PIEs too.
IOW, IMO, all this talk about core files is a distraction
from the real issue.
But then I wonder why does compilation, linking, loading all
succeed without something realizing the binary can't run on
this target. It may well be that PIEs do make sense for this
target. It's not uncommon to call things "bare-metal" when
they're really pretty sophisticated RTOSs.
> It just means a proper standalone
> test doesn't exist to catch such a problem and we got lucky crashing
> when doing a core file test on a target that doesn't support it. It is
> not like the test was designed to catch this.
>
> I find it a bit messy. A proper test would attempt to run pie
> executables to completion (and i can contribute that to verify this
> particular problem).
How would that help, if it'd crash and loop the board too?
> I just don't like the concept of running a test that is unsupported on a
> particular target (core files) only to test a side-effect during
> pre-test/setup phases. It only adds to artificial PASSes that don't
> necessarily translate to robustness.
>
> But i understand if this is not acceptable. I just want to clean this
> target up, and seeing core file tests being executed is just confusing. :-)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-02-23 15:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 14:13 Luis Machado
2017-02-23 14:25 ` Pedro Alves
2017-02-23 14:47 ` Luis Machado
2017-02-23 14:54 ` Pedro Alves
2017-02-23 15:10 ` Luis Machado
2017-02-23 15:43 ` Pedro Alves [this message]
2017-02-23 16:16 ` Luis Machado
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=713c3608-ff65-a940-13d1-afd4da53700c@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.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