public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>,
	       Sandra Loosemore <sandra@codesourcery.com>,
	gdb-patches@sourceware.org
Subject: Re: [rfc] PR 20569, segv in follow_exec
Date: Thu, 20 Oct 2016 23:27:00 -0000	[thread overview]
Message-ID: <5ee7b45e-2c00-8c6b-f77c-b2ec79e2a64f@redhat.com> (raw)
In-Reply-To: <26518bd3-f378-74d2-bc26-fbdfd2a95f09@codesourcery.com>

On 10/19/2016 09:19 PM, Luis Machado wrote:

> I was thinking of a way to test this and decided to exercise everything
> against an invalid sysroot (by always passing 'set sysroot
> <something_invalid>' and i noticed quite a few segmentation faults
> ocurring in 10+ tests.
> 
> Now we know things are broken and we know how to show that, but i'm
> wondering if we want to re-run tests with an invalid sysroot or if the
> manual testing with a sysroot override is enough.

I think we should have some representative test that always runs,
without requiring manual testing.

> 
> I could add a loop to each test that is failing, but, though that
> exercises and shows the failure, it sounds like a waste of time to
> repeat those tests.

Yeah.

> 
> I could also pick one candidate and isolate that in a test, but i'm not
> yet sure if all those 10+ failures fail for the same exact reason.
> 
> Suggestions?

I think it is sufficient to have one representative test for
each reasons (or reasons).  Whether that is a new separate testcase
or whether we reuse some existing testcase, I guess depends on how
complicated the test needs to be.  If trivial, maybe go for separate,
focused test.   If a lot of test set up is needed, e.g., to get the
inferior to the state that triggers the bug), might make sense to
reuse some existing testcase.


> 
> These are the failing tests:
> 
> gdb.base/catch-syscall.exp
> gdb.base/execl-update-breakpoints.exp
> gdb.base/foll-exec-mode.exp
> gdb.base/foll-exec.exp
> gdb.base/foll-vfork.exp
> gdb.base/pie-execl.exp
> gdb.linespec/explicit.exp
> gdb.multi/bkpt-multi-exec.exp
> gdb.python/py-finish-breakpoint.exp
> gdb.threads/execl.exp
> gdb.threads/non-ldr-exc-1.exp
> gdb.threads/non-ldr-exc-2.exp
> gdb.threads/non-ldr-exc-3.exp
> gdb.threads/non-ldr-exc-4.exp
> gdb.threads/thread-execl.exp

The obvious pattern here is that these are tests that exec.  :-)

-- 
Thanks,
Pedro Alves

  reply	other threads:[~2016-10-20 23:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 22:51 Sandra Loosemore
2016-10-18 18:11 ` Luis Machado
2016-10-19 13:37   ` Pedro Alves
2016-10-19 16:14     ` Luis Machado
2016-10-19 20:19       ` Luis Machado
2016-10-20 23:27         ` Pedro Alves [this message]
2016-10-21 18:30           ` Luis Machado
2016-10-21 18:33             ` Pedro Alves
2016-10-21 18:34               ` 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=5ee7b45e-2c00-8c6b-f77c-b2ec79e2a64f@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=sandra@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).