aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2021-07-01 10:49:27 -0400
committerDavid Edelsohn <dje.gcc@gmail.com>2021-07-03 17:49:54 -0400
commit981351e87b7ad7a0660d4f3a34614172f3d8376b (patch)
tree0054f2d47920faacbe76b2e1d53f5a87554d3ff3
parent52c3fdf3e4780f75297515d3c2a3dae9b36586ba (diff)
downloadgcc-981351e87b7ad7a0660d4f3a34614172f3d8376b.zip
gcc-981351e87b7ad7a0660d4f3a34614172f3d8376b.tar.gz
gcc-981351e87b7ad7a0660d4f3a34614172f3d8376b.tar.bz2
testsuite: Disable BTF and CTF testsuite on AIX.
CTF utilizes DWARF sections, but it is a distinct debugging format. The CTF support in GCC is not implemented as a separate debugging format. AIX supports DWARF but not CTF section. The GCC testsuite test for target support of a debugging format checks if GCC itself emits an error message, not if the debugging output compiles correctly. Because CTF is not a distinct debugging format, GCC does not distinguish support for targets and does not have the ability to produce an error message. This patch skips the CTF and BTF debug directories, and explicitly reports that AIX doesn't support CTF. Currently the dejagnu code to skip multiple debugging levels for CTF does not ensure that CTF is a supported debugging format. The patch also shifts the CTF options logic to within the test that CTF debug format is supported. Bootstrapped on powerpc-ibm-aix7.2.3.0 and powerpc64le-linux. gcc/testsuite/ChangeLog: * gcc.dg/debug/btf/btf.exp: Skip on AIX. * gcc.dg/debug/ctf/ctf.exp: Skip on AIX. * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): AIX doesn't support CTF. (gcc-dg-debug-runtest): Move CTF support within target support format test.
-rw-r--r--gcc/testsuite/gcc.dg/debug/btf/btf.exp5
-rw-r--r--gcc/testsuite/gcc.dg/debug/ctf/ctf.exp5
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp45
3 files changed, 33 insertions, 22 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf.exp b/gcc/testsuite/gcc.dg/debug/btf/btf.exp
index e72a2be..e173515 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf.exp
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf.exp
@@ -24,6 +24,11 @@ if { [istarget nvptx-*-*] } {
return
}
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
index 46055f8..0b650ed 100644
--- a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
+++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
@@ -24,6 +24,11 @@ if { [istarget nvptx-*-*] } {
return
}
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 51d8a11..81f4bb2 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -641,6 +641,7 @@ proc gcc-dg-frontend-supports-ctf { target_compile trivial } {
proc gcc-dg-target-supports-debug-format { target_compile trivial type } {
global srcdir subdir
+ if {$type == "-gctf" && [istarget *-*-aix*]} { return 0 }
set comp_output [$target_compile \
"$srcdir/$subdir/$trivial" "trivial.S" assembly \
"additional_flags=$type"]
@@ -656,29 +657,29 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
if ![info exists DEBUG_TORTURE_OPTIONS] {
set DEBUG_TORTURE_OPTIONS ""
foreach type {-gctf -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+} {
- if { $type == "-gctf" } {
- if [expr [gcc-dg-frontend-supports-ctf \
- $target_compile $trivial]] {
- # At this time, running tests with various opt levels or
- # ctf debug info levels does not add value.
- lappend DEBUG_TORTURE_OPTIONS [list "${type}"]
+ if [expr [gcc-dg-target-supports-debug-format \
+ $target_compile $trivial $type]] {
+ if { $type == "-gctf" } {
+ if [expr [gcc-dg-frontend-supports-ctf \
+ $target_compile $trivial]] {
+ # At this time, running tests with various opt levels or
+ # ctf debug info levels does not add value.
+ lappend DEBUG_TORTURE_OPTIONS [list "${type}"]
+ }
+ continue
}
- } else {
- if [expr [gcc-dg-target-supports-debug-format \
- $target_compile $trivial $type]] {
- foreach level {1 "" 3} {
- if { ($type == "-gdwarf-2") && ($level != "") } {
- lappend DEBUG_TORTURE_OPTIONS [list "${type}" "-g${level}"]
- foreach opt $opt_opts {
- lappend DEBUG_TORTURE_OPTIONS \
- [list "${type}" "-g${level}" "$opt" ]
- }
- } else {
- lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
- foreach opt $opt_opts {
- lappend DEBUG_TORTURE_OPTIONS \
- [list "${type}${level}" "$opt" ]
- }
+ foreach level {1 "" 3} {
+ if { ($type == "-gdwarf-2") && ($level != "") } {
+ lappend DEBUG_TORTURE_OPTIONS [list "${type}" "-g${level}"]
+ foreach opt $opt_opts {
+ lappend DEBUG_TORTURE_OPTIONS \
+ [list "${type}" "-g${level}" "$opt" ]
+ }
+ } else {
+ lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
+ foreach opt $opt_opts {
+ lappend DEBUG_TORTURE_OPTIONS \
+ [list "${type}${level}" "$opt" ]
}
}
}