public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1997] testsuite: Disable BTF and CTF testsuite on AIX.
@ 2021-07-03 21:47 David Edelsohn
  0 siblings, 0 replies; only message in thread
From: David Edelsohn @ 2021-07-03 21:47 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:981351e87b7ad7a0660d4f3a34614172f3d8376b

commit r12-1997-g981351e87b7ad7a0660d4f3a34614172f3d8376b
Author: David Edelsohn <dje.gcc@gmail.com>
Date:   Thu Jul 1 10:49:27 2021 -0400

    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.

Diff:
---
 gcc/testsuite/gcc.dg/debug/btf/btf.exp |  5 ++++
 gcc/testsuite/gcc.dg/debug/ctf/ctf.exp |  5 ++++
 gcc/testsuite/lib/gcc-dg.exp           | 45 +++++++++++++++++-----------------
 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 e72a2be8516..e1735158666 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 46055f8a2bf..0b650ed7406 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 51d8a11f878..81f4bb2ff79 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" ]
 			}
 		    }
 		}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-03 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-03 21:47 [gcc r12-1997] testsuite: Disable BTF and CTF testsuite on AIX David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).