]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Disable BTF and CTF testsuite on AIX.
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 1 Jul 2021 14:49:27 +0000 (10:49 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sat, 3 Jul 2021 21:49:54 +0000 (17:49 -0400)
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.

gcc/testsuite/gcc.dg/debug/btf/btf.exp
gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
gcc/testsuite/lib/gcc-dg.exp

index e72a2be8516ee1db0ddef8a5ad8e00484b62aae0..e1735158666e35aa864384f21fb35d914bd528f1 100644 (file)
@@ -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 {
index 46055f8a2bf19d342e20ff594778364b4605172b..0b650ed74065a13e469d99cabff9bc51449fa2dc 100644 (file)
@@ -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 {
index 51d8a11f878c1e5ddf43c6986d33427d678f9d78..81f4bb2ff7934ae753541fdf8b0a2de8f33b2c70 100644 (file)
@@ -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" ]
                        }
                    }
                }