From patchwork Fri Jul 14 10:35:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 72686 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 B75E23858428 for ; Fri, 14 Jul 2023 10:41:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B75E23858428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689331306; bh=76UqKjrZAz/NLSRv7GPryCgDJbzrA/JfGpn4H8M/sM8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=iwT6purJqIOcRXzCMXWKUiSk7wkrAyEfTzRsUCvApKCrPb8yDyBIxS4GnP5cr7B+Z ZZAloCsuslLNWavaC6sn7nOr36NTZHlbDEBM9pVUCuc33vOiPeUXrzIFfjkiFeXCzl rkc/+9huiRFu5LZMtSxbRuy6HyYIRBr2K/cFD6xA= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id 1572B38582BE for ; Fri, 14 Jul 2023 10:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1572B38582BE Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-481--HSfgUpYM4W-q2ooiyTXRA-1; Fri, 14 Jul 2023 06:41:20 -0400 X-MC-Unique: -HSfgUpYM4W-q2ooiyTXRA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D80B800193 for ; Fri, 14 Jul 2023 10:41:20 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7E3740C6CCC; Fri, 14 Jul 2023 10:41:19 +0000 (UTC) To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [PATCH] gdb/testsuite: Disable gdb.compile when testing with clang Date: Fri, 14 Jul 2023 12:35:01 +0200 Message-ID: <20230714103500.25744-2-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 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 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(+) diff --git a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp index 26cfab50914..119f1f6771f 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp index 05962208e2e..92a5d62b3e5 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp index a6cfeb6fe5a..346e21e1d83 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-member.exp b/gdb/testsuite/gdb.compile/compile-cplus-member.exp index da9418edf53..522f5cbe0bf 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-member.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-member.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-method.exp b/gdb/testsuite/gdb.compile/compile-cplus-method.exp index 994e00d48c4..f4b44800297 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-method.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-method.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp index 65cc3ac51c3..dc9eec50c77 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp index 86fddb324aa..bd5eb751757 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-print.exp b/gdb/testsuite/gdb.compile/compile-cplus-print.exp index a30ad2a44e8..84c95f0adcc 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-print.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-print.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp index f50e385ff73..f09ec1731f1 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp index 4e887daeb29..428e4857d20 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp index 990d35a53f6..8e32ace60e9 100644 --- a/gdb/testsuite/gdb.compile/compile-ifunc.exp +++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp index 3935d472389..d4438600121 100644 --- a/gdb/testsuite/gdb.compile/compile-ops.exp +++ b/gdb/testsuite/gdb.compile/compile-ops.exp @@ -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 # diff --git a/gdb/testsuite/gdb.compile/compile-print.exp b/gdb/testsuite/gdb.compile/compile-print.exp index 33f1949b958..5a1d56b99bd 100644 --- a/gdb/testsuite/gdb.compile/compile-print.exp +++ b/gdb/testsuite/gdb.compile/compile-print.exp @@ -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 } diff --git a/gdb/testsuite/gdb.compile/compile-setjmp.exp b/gdb/testsuite/gdb.compile/compile-setjmp.exp index 3fc3b6d7ad1..2140953aa3d 100644 --- a/gdb/testsuite/gdb.compile/compile-setjmp.exp +++ b/gdb/testsuite/gdb.compile/compile-setjmp.exp @@ -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 } diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.compile/compile-tls.exp index e9281aa6e72..2b6c37173e3 100644 --- a/gdb/testsuite/gdb.compile/compile-tls.exp +++ b/gdb/testsuite/gdb.compile/compile-tls.exp @@ -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 diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index f3d87cd2605..e3ef50fb31e 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -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] } {