gdb/testsuite: Disable gdb.compile when testing with clang
Commit Message
Attempting to test the gdb.compile with clang as the compiler results in
over 300 unexpected errors, due to a segmentation fault and several
handshake failures. Since these tests are also very shaky on gcc, This
commit only disables them for clang instead of attempting to fix them.
---
gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-inherit.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-member.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-method.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-nested.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-print.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus-virtual.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-cplus.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-ifunc.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-ops.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-print.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-setjmp.exp | 5 +++++
gdb/testsuite/gdb.compile/compile-tls.exp | 5 +++++
gdb/testsuite/gdb.compile/compile.exp | 3 +++
16 files changed, 78 insertions(+)
Comments
>>>>> "Bruno" == Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> writes:
Bruno> Attempting to test the gdb.compile with clang as the compiler results in
Bruno> over 300 unexpected errors, due to a segmentation fault and several
Bruno> handshake failures. Since these tests are also very shaky on gcc, This
Bruno> commit only disables them for clang instead of attempting to fix them.
Bruno> require allow_cplus_tests
Bruno> +if ![test_compiler_info gcc*] {
Bruno> + untested "GCC is required for this test"
Bruno> + return
It's better to use some 'require' formulation than to add new calls to
untested.
Bruno> @@ -20,6 +20,9 @@ standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
Bruno> set options {}
Bruno> if [test_compiler_info gcc*] {
Bruno> lappend options additional_flags=-g3
Bruno> +} else {
Bruno> + untested "compile tests only make sense with gcc"
Bruno> + return 0
Bruno> }
In this spot require can be used and then the 'if' removed.
Tom
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++ additional_flags=-std=c++11}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -17,6 +17,11 @@ load_lib compile-support.exp
standard_testfile
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
set options {}
if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
@@ -21,6 +21,11 @@ standard_testfile .cc
require allow_cplus_tests
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -17,6 +17,11 @@ load_lib compile-support.exp
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
set options {}
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
lappend options additional_flags=-g3
@@ -19,6 +19,11 @@ require allow_ifunc_tests
standard_testfile
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
set flags ""
if [test_compiler_info gcc*] {
set flags additional_flags=-Wno-attribute-alias
@@ -22,6 +22,11 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
standard_testfile .c -dbg.S
#
@@ -17,6 +17,11 @@ load_lib compile-support.exp
standard_testfile
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if { [prepare_for_testing "failed to prepare" "$testfile"] } {
return -1
}
@@ -17,6 +17,11 @@ load_lib compile-support.exp
standard_testfile .c compile-setjmp-mod.c
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if { [prepare_for_testing "failed to prepare" $testfile] } {
return -1
}
@@ -17,6 +17,11 @@ load_lib compile-support.exp
standard_testfile .c
+if ![test_compiler_info gcc*] {
+ untested "GCC is required for this test"
+ return
+}
+
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
return -1
@@ -20,6 +20,9 @@ standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
set options {}
if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
+} else {
+ untested "compile tests only make sense with gcc"
+ return 0
}
if { ![is_x86_64_m64_target] } {