From patchwork Wed Jul 19 14:40:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 72939 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B06C33857711 for ; Wed, 19 Jul 2023 14:41:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B06C33857711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689777669; bh=cAqGqeouArlYfvJ0V897Aso4QPCDHbd299B3pNdr63c=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=KibFTb7Lw2KElfWNfg4vWALJ9vpnCN9f1M6iEWsdlc+Usq7dtOvVhOpUulwpHoAeC 3jJXybOM9vN2duMP2dCIwUJrdsfQvlcpOoiL+Ejk9RSevOpuoQjpEogvYRtlfxTvER 1oK3kPOiJRpG2BmSqrwS4ai4RxHgLsBzwGaeRFPE= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A72243858C33 for ; Wed, 19 Jul 2023 14:40:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A72243858C33 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-u3h0x7uyMXWRQxtGQAnIOw-1; Wed, 19 Jul 2023 10:40:43 -0400 X-MC-Unique: u3h0x7uyMXWRQxtGQAnIOw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 81ED9280D58A for ; Wed, 19 Jul 2023 14:40:42 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.225.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DAA9A492B01; Wed, 19 Jul 2023 14:40:41 +0000 (UTC) To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [PATCH v2] gdb/testsuite: Disable gdb.compile when testing with clang Date: Wed, 19 Jul 2023 16:40:05 +0200 Message-ID: <20230719144004.2340580-2-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bruno Larsen via Gdb-patches From: Guinevere Larsen Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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 the whole feature is designed around a gcc plugin, and even the gcc testing is shaky at best, this commit restricts those tests to only running under gcc. If that gets fixed, this commit can be reverted. --- Changes for v2: * Used require instead of "if" when checking compiler gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-inherit.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-member.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-method.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-nested.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-print.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus-virtual.exp | 2 ++ gdb/testsuite/gdb.compile/compile-cplus.exp | 2 ++ gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 ++ gdb/testsuite/gdb.compile/compile-ops.exp | 2 ++ gdb/testsuite/gdb.compile/compile-print.exp | 2 ++ gdb/testsuite/gdb.compile/compile-setjmp.exp | 2 ++ gdb/testsuite/gdb.compile/compile-tls.exp | 2 ++ gdb/testsuite/gdb.compile/compile.exp | 6 ++---- 16 files changed, 32 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp index 26cfab50914..b4001347a7b 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp index 05962208e2e..4ab69281336 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++ additional_flags=-std=c++11}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp index a6cfeb6fe5a..76d80bbbaf8 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-member.exp b/gdb/testsuite/gdb.compile/compile-cplus-member.exp index da9418edf53..9fccfd8992f 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-member.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-member.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-method.exp b/gdb/testsuite/gdb.compile/compile-cplus-method.exp index 994e00d48c4..84481637655 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-method.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-method.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp index 65cc3ac51c3..102d4161a36 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp index 86fddb324aa..124c278017e 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-print.exp b/gdb/testsuite/gdb.compile/compile-cplus-print.exp index a30ad2a44e8..587f30e4074 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-print.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-print.exp @@ -17,6 +17,8 @@ load_lib compile-support.exp standard_testfile +require is_c_compiler_gcc + set options {} if [test_compiler_info gcc*] { lappend options additional_flags=-g3 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp index f50e385ff73..92c88fc0887 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp @@ -21,6 +21,8 @@ standard_testfile .cc require allow_cplus_tests +require is_c_compiler_gcc + if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { return -1 diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp index 4e887daeb29..c8a40ada7f3 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus.exp @@ -17,6 +17,8 @@ load_lib compile-support.exp standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c +require is_c_compiler_gcc + set options {} if { [test_compiler_info gcc*] || [test_compiler_info clang*] } { lappend options additional_flags=-g3 diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp index 990d35a53f6..c50228d2c94 100644 --- a/gdb/testsuite/gdb.compile/compile-ifunc.exp +++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp @@ -19,6 +19,8 @@ require allow_ifunc_tests standard_testfile +require is_c_compiler_gcc + set flags "" if [test_compiler_info gcc*] { set flags additional_flags=-Wno-attribute-alias diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp index 3935d472389..bbc221d7c0a 100644 --- a/gdb/testsuite/gdb.compile/compile-ops.exp +++ b/gdb/testsuite/gdb.compile/compile-ops.exp @@ -22,6 +22,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support +require is_c_compiler_gcc + standard_testfile .c -dbg.S # diff --git a/gdb/testsuite/gdb.compile/compile-print.exp b/gdb/testsuite/gdb.compile/compile-print.exp index 33f1949b958..bbc68a0f09f 100644 --- a/gdb/testsuite/gdb.compile/compile-print.exp +++ b/gdb/testsuite/gdb.compile/compile-print.exp @@ -17,6 +17,8 @@ load_lib compile-support.exp standard_testfile +require is_c_compiler_gcc + if { [prepare_for_testing "failed to prepare" "$testfile"] } { return -1 } diff --git a/gdb/testsuite/gdb.compile/compile-setjmp.exp b/gdb/testsuite/gdb.compile/compile-setjmp.exp index 3fc3b6d7ad1..eed31a7a626 100644 --- a/gdb/testsuite/gdb.compile/compile-setjmp.exp +++ b/gdb/testsuite/gdb.compile/compile-setjmp.exp @@ -17,6 +17,8 @@ load_lib compile-support.exp standard_testfile .c compile-setjmp-mod.c +require is_c_compiler_gcc + if { [prepare_for_testing "failed to prepare" $testfile] } { return -1 } diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.compile/compile-tls.exp index e9281aa6e72..7647111de52 100644 --- a/gdb/testsuite/gdb.compile/compile-tls.exp +++ b/gdb/testsuite/gdb.compile/compile-tls.exp @@ -17,6 +17,8 @@ load_lib compile-support.exp standard_testfile .c +require is_c_compiler_gcc + if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable {debug}] != "" } { return -1 diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index f3d87cd2605..38818d2d255 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -17,10 +17,8 @@ load_lib compile-support.exp standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c -set options {} -if [test_compiler_info gcc*] { - lappend options additional_flags=-g3 -} +require is_c_compiler_gcc +set options {additional_flags=-g3} if { ![is_x86_64_m64_target] } { verbose "Skipping x86_64 LOC_CONST test."