Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
Date: Thu, 23 Feb 2017 16:16:00 -0000	[thread overview]
Message-ID: <7b8b7c00-c2e4-9a7f-9738-990a4e4be351@codesourcery.com> (raw)
In-Reply-To: <713c3608-ff65-a940-13d1-afd4da53700c@redhat.com>

On 02/23/2017 09:43 AM, Pedro Alves wrote:
> 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.

I find it reasonable too, but it is not here yet.

> 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.

This is just a stack pointer startup problem, so not a matter of 
supporting PIE's or not.

> How would that help, if it'd crash and loop the board too?
>

The test would need to be tweaked. The assumption that these targets can 
handle a crash is not always valid as it is with OS-based targets.

I remember i addressed problems with these assumptions in the past. It 
is similar to assuming reading 0x0 would error out or that it is a bad 
address. We are much more aware of that problem these days.

Unfortunately not a lot of bare-metal/RTOS testing going on for gdb at 
the moment. I think even QEMU shields these tests from problems sometimes.

Anyway, i know what i have to do to get this FAIL fixed!

The discussion about how focused/robust a particular gdb test is/needs 
to be can be rather long. At this point i don't think there is a lot of 
benefit from that, but maybe a worthy discussion in the future about how 
to improve gdb's testsuite, or not!


      reply	other threads:[~2017-02-23 16:16 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
2017-02-23 16:16           ` Luis Machado [this message]

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=7b8b7c00-c2e4-9a7f-9738-990a4e4be351@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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