Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
Date: Thu, 23 Feb 2017 14:13:00 -0000	[thread overview]
Message-ID: <1487859197-6269-1-git-send-email-lgustavo@codesourcery.com> (raw)

This particular test doesn't work correctly on aarch64-elf for a couple
reasons.

First, the test is supposed to crash and bare-metal targets are not always
ready to handle such exceptions like Linux does. In our case the board just
keeps cycling within an ISR function.

Second, core file generation is not guaranteed/not supposed to work with
bare-metal targets.  If it does, it may just be luck.

Therefore the following patch restricts this particular test to only native
and Linux targets, like some other core file tests.

I see other core file tests that are not restricted to native/linux, but i
don't see failures due to those. It doesn't mean they are correct in their
assumptions though. I could fix those up in a single batch if it is deemed
appropriate. Otherwise i'm happy with fixing only this one.

gdb/testsuite/ChangeLog:
2017-02-23  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.base/gcore-relro-pie.exp: Restrict to native/linux targets.
---
 gdb/testsuite/gdb.base/gcore-relro-pie.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gdb/testsuite/gdb.base/gcore-relro-pie.exp b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
index 28321fc..fd255e4 100644
--- a/gdb/testsuite/gdb.base/gcore-relro-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
@@ -19,6 +19,11 @@
 
 standard_testfile
 
+if {![isnative] || ![istarget "*-*-linux*"]} {
+    untested "skipping core file test"
+    return 0
+}
+
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -Wl,-z,relro"}]} {
     return -1
 }
-- 
2.7.4


             reply	other threads:[~2017-02-23 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 14:13 Luis Machado [this message]
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

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=1487859197-6269-1-git-send-email-lgustavo@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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