Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Make gdb.arch/i386-biarch-core.exp more robust
Date: Mon, 06 Feb 2017 17:28:00 -0000	[thread overview]
Message-ID: <bf39103d-3442-5cbf-15ed-7ec3d7610600@redhat.com> (raw)
In-Reply-To: <1485870927-12623-1-git-send-email-lgustavo@codesourcery.com>

On 01/31/2017 01:55 PM, Luis Machado wrote:
> This test attempts to load a x86 core file no matter what the target
> architecture is. If the architecture is not x86, GDB will not recognize
> the core file and therefore won't have any memory to inspect. All we will
> have is a memory read error, resulting in a FAIL.
> 
> The following patch addresses this by checking if we successfully loaded
> the core file. If not, just return. Otherwise it keeps testing.
> 
> gdb/testsuite/ChangeLog:
> 
> 2017-01-31  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* gdb.arch/i386-biarch-core.exp: Return if core file was not
> 	recognized.

This seems to contradict a bit the point of the test, which says:

> # Test if at least the core file segments memory has been loaded.

when:

> # Wrongly built GDB complains by:
> # "..." is not a core dump: File format not recognized

I.e., would we be potentially losing coverage?  Assurance
that we're not I think should be part of the rationale for
this change.

Does the test pass for you if your non --target=x86 build
ends up including x86 support, with e.g., --enable-targets=all?

If it does, then maybe we should check whether the GDB
build supports x86, by e.g., doing:

  gdb_test_multiple "complete set architecture i386" ...

and seeing if something comes out.

then only do "unsupported" if x86 is not supported, otherwise,
the memory read failure is really a fail.

Thanks,
Pedro Alves


  reply	other threads:[~2017-02-06 17:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 13:55 Luis Machado
2017-02-06 17:28 ` Pedro Alves [this message]
2017-02-06 17:59   ` Luis Machado
2017-02-06 18:03     ` Pedro Alves
2017-02-07 10:11 ` [PATCH,v2] " Luis Machado
2017-02-07 10:51   ` Pedro Alves
2017-02-07 11:18     ` Luis Machado
2017-02-07 11:26 ` [PATCH, v3] " Luis Machado
2017-02-07 11:29   ` Pedro Alves
2017-02-13 13:15     ` 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=bf39103d-3442-5cbf-15ed-7ec3d7610600@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