This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 23 Feb 2017 08:13:17 -0600
- Subject: [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
- Authentication-results: sourceware.org; auth=none
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