Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets
@ 2017-02-23 14:13 Luis Machado
  2017-02-23 14:25 ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Luis Machado @ 2017-02-23 14:13 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-23 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 14:13 [PATCH] Restrict gdb.base/gcore-relro-pie.exp to native/linux targets 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox