Testsuite: Remove pie from trace tests
authorAlan Hayward <alan.hayward@arm.com>
Tue, 23 Apr 2019 13:12:25 +0000 (14:12 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Tue, 23 Apr 2019 13:12:25 +0000 (14:12 +0100)
Ubuntu/Debian defaults PIE to enabled.  This causes the trace tests
to fall over due to variables being returned as "unavailable".  The
tests were never designed to work with pie.

Simply ensure the nopie flag is always used for the failing tests.

This removes 100+ failures when running native-gdbserver on Ubuntu 18.04.

gdb/testsuite/ChangeLog:

* gdb.trace/backtrace.exp: Use nopie flag.
* gdb.trace/circ.exp: Likewise.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/ftrace.exp: Likewise.
* gdb.trace/mi-trace-unavailable.exp: Likewise.
* gdb.trace/mi-traceframe-changed.exp: Likewise.
* gdb.trace/qtro.exp: Likewise.
* gdb.trace/read-memory.exp: Likewise.
* gdb.trace/report.exp: Likewise.
* gdb.trace/tfile.exp: Likewise.
* gdb.trace/tfind.exp: Likewise.
* gdb.trace/unavailable.exp: Likewise.

13 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/circ.exp
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/mi-trace-unavailable.exp
gdb/testsuite/gdb.trace/mi-traceframe-changed.exp
gdb/testsuite/gdb.trace/qtro.exp
gdb/testsuite/gdb.trace/read-memory.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/tfile.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/unavailable.exp

index 20bcd25be88a5936498385fa646dc2cea20fc29e..115623d7e0f43b787551a719380b84a03dcaa23c 100644 (file)
@@ -1,3 +1,18 @@
+2019-04-23  Alan Hayward  <alan.hayward@arm.com>
+
+       * gdb.trace/backtrace.exp: Use nopie flag.
+       * gdb.trace/circ.exp: Likewise.
+       * gdb.trace/collection.exp: Likewise.
+       * gdb.trace/ftrace.exp: Likewise.
+       * gdb.trace/mi-trace-unavailable.exp: Likewise.
+       * gdb.trace/mi-traceframe-changed.exp: Likewise.
+       * gdb.trace/qtro.exp: Likewise.
+       * gdb.trace/read-memory.exp: Likewise.
+       * gdb.trace/report.exp: Likewise.
+       * gdb.trace/tfile.exp: Likewise.
+       * gdb.trace/tfind.exp: Likewise.
+       * gdb.trace/unavailable.exp: Likewise.
+
 2019-04-22  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/solib-probes-nosharedlibrary.c,
index 0f60153cb56450bbc41ffaf63ef69d66dd079808..24e097135f0400a0e4d4154d89eaf2fbd58a2952 100644 (file)
@@ -27,7 +27,7 @@ if ![gdb_trace_common_supports_arch] {
 }
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
-       [list debug nowarnings]] {
+       [list debug nowarnings nopie]] {
     return -1
 }
 
index d48eca5deb5667f1e6576b04349f0adc20422eb1..30ec9b47fc757692a3ebb25a6cf6dd5504a9ae58 100644 (file)
@@ -17,7 +17,7 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings nopie}]} {
     return -1
 }
 
index 8c064385ba2be80c2dc8ebdcd61f5d3e7a38fa83..44eccbe8659cc430800cdc123ea22cee2fe2ffad 100644 (file)
@@ -19,7 +19,7 @@ load_lib "trace-support.exp"
 standard_testfile
 set executable $testfile
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings nopie}]} {
     return -1
 }
 
index f97c2c6193468517c1b958d6d00cfdac567c919d..702efe76bbdd4abef2ff1a345c3d56756730b564 100644 (file)
@@ -53,7 +53,7 @@ set remote_libipa [gdb_load_shlib $libipa]
 # file unused because linking not done" when building the object.
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
-         executable [list debug $additional_flags shlib=$libipa] ] != "" } {
+         executable [list debug nopie $additional_flags shlib=$libipa] ] != "" } {
     untested "failed to compile"
     return -1
 }
index 5ec4bbc152ed1fdeaa8bdae45359ff8c8960fded..f0b3c52728ec26d6edbc0d29f02dc47010da81bd 100644 (file)
@@ -17,7 +17,7 @@ load_lib trace-support.exp
 
 standard_testfile trace-unavailable.c
 
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug nopie}] } {
     return -1
 }
 
index 781d3646cb59938487239cf35c78b4cc6e852ef1..1244b5b2730798ca2017606e7f62c7a98c0822f9 100644 (file)
@@ -32,7 +32,7 @@ if {![is_remote host] && ![is_remote target]} {
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
           executable \
-          [list debug nowarnings \
+          [list debug nowarnings nopie\
                "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \
          != "" } {
      untested "failed to compile"
index 9eabfeb51e43c75882360b5de6c8c4aff283de26..d5d912b5b90ccd460aa160f2c30527048be8693e 100644 (file)
@@ -22,7 +22,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nopie}]} {
     return -1
 }
 clean_restart $testfile
index 61fc1379168103b0e9cad2d2877886060ad65dc1..4d19f0074d8c4573b06ec62e983058bf94cde4c1 100644 (file)
@@ -17,7 +17,7 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nopie}]} {
     return -1
 }
 
index f43fbb7c623408e8ac4748c0861a0a15d55ca358..c847ab0c5ba2d630568e608fb2445879811c6f88 100644 (file)
@@ -27,7 +27,7 @@ if ![gdb_trace_common_supports_arch] {
     return -1
 }
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
-         executable {debug nowarnings}] != "" } {
+         executable {debug nowarnings nopie}] != "" } {
     untested "failed to compile"
     return -1
 }
index 04f3e98e9942c755210b0319831c30c92212376d..23f4fc58d0c3bd2ea16f178921c32e05910cf492 100644 (file)
@@ -37,7 +37,7 @@ if {![is_remote host] && ![is_remote target]} {
 standard_testfile
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable \
-         [list debug \
+         [list debug nopie\
               "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \
         != "" } {
     untested "failed to compile"
index 2c9996b040bdad8bb7e2e18b5b03dde31449e3fd..fb58f801961c1f92151790d89e9080d128411078 100644 (file)
@@ -29,7 +29,7 @@ if ![gdb_trace_common_supports_arch] {
 }
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
-         executable {debug nowarnings}] != "" } {
+         executable {debug nowarnings nopie}] != "" } {
     untested "failed to compile"
     return -1
 }
index 23d593e7d3e1bfd74e4e1e07fd174c68a4418832..f3bb54db345f96a23ac7f0c402e7043700f93630 100644 (file)
@@ -19,7 +19,7 @@ standard_testfile unavailable.cc
 set executable $testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
-        {debug nowarnings c++}]} {
+        {debug nowarnings c++ nopie}]} {
     return -1
 }