From: David Edelsohn Date: Thu, 1 Jul 2021 14:49:27 +0000 (-0400) Subject: testsuite: Disable BTF and CTF testsuite on AIX. X-Git-Tag: basepoints/gcc-13~6316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981351e87b7ad7a0660d4f3a34614172f3d8376b;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/gcc.dg/debug/btf/btf.exp b/gcc/testsuite/gcc.dg/debug/btf/btf.exp index e72a2be8516e..e1735158666e 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 46055f8a2bf1..0b650ed74065 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 51d8a11f878c..81f4bb2ff793 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" ] } } }