From patchwork Wed Nov 30 19:35:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 61279 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 A2C51385457E for ; Wed, 30 Nov 2022 19:36:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2C51385457E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669836998; bh=voxBnT6h4RrRVkGit9J6L3BDDAb3YHlWowR6qCZQHTU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=VmpS0znQz9u6H2SAgw3WQ+gbwOH5uZ3LHlW0t3PDQHQnkDMYseQseeRNgNPpDX4b5 auEL47b7nou2jYdz+4W21LCsL184kCsmyM/l5oySSCR/uY3hyayVy6LeISuIRT9mlU XKodvm/W+QgVqOo2QopZPzSuqKVQqvuAvQ0OwUX8= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by sourceware.org (Postfix) with ESMTPS id F2D243858434 for ; Wed, 30 Nov 2022 19:35:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2D243858434 Received: by mail-io1-xd34.google.com with SMTP id y6so13023316iof.9 for ; Wed, 30 Nov 2022 11:35:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=voxBnT6h4RrRVkGit9J6L3BDDAb3YHlWowR6qCZQHTU=; b=jX7r7zzNzHkdN1miksuZPBFrDUcoQRc976telsKNL7pPxLL+ZKZZEvFjU7cM8G3aec gF8376EC8oCaYkoJeTbyOT4brG1bHcQZ7FGThEpMVafXkw1eRZWECHPw20PNmds0tZ06 qGvnECrAyMgfVs9EpuY+a7BcOvTu2CUpBgf4FoCeiPrKeCx4hRiLQk//v+4peKrGiK1T 4BrUctvJChRPnGrpP+pH4VlhUAzBpATTGtJTQakeTcSFW8pPfx6qaUNUg9EnXAO6tNhL pXz/Ae0X8GRAcX3E9PpI9MrSGrdQngl2cdIOriMAPvR1+MKyOdOxf+gywIxMvrE0XNxS ITWA== X-Gm-Message-State: ANoB5pnrpU2QEj9Pbcd+ixWk2dJ4bckMIFEnRCzOVrcXUeguPT79hG2s vOiJzjNGCzvYeF7Un+bQBs5rO/TXELCEig== X-Google-Smtp-Source: AA0mqf789VtOcQdjrMf7LoOY3hTLRTlQW3wmmWgKzPRW1oSNRVsORe9WPtFXhYEOpcK0dZwoI9HiHw== X-Received: by 2002:a05:6638:345:b0:363:a7e9:194b with SMTP id x5-20020a056638034500b00363a7e9194bmr21873799jap.122.1669836941329; Wed, 30 Nov 2022 11:35:41 -0800 (PST) Received: from localhost.localdomain (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id o1-20020a027401000000b00375126ae55fsm857201jac.58.2022.11.30.11.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 11:35:40 -0800 (PST) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/3] Remove one copy of skip_compile_feature_tests Date: Wed, 30 Nov 2022 12:35:29 -0700 Message-Id: <20221130193531.2464972-2-tromey@adacore.com> X-Mailer: git-send-email 2.34.3 In-Reply-To: <20221130193531.2464972-1-tromey@adacore.com> References: <20221130193531.2464972-1-tromey@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I noticed that there are two identical copies of skip_compile_feature_tests in the test suite. This removes one from gdb.exp, in favor of the one in compile-support.exp. --- gdb/testsuite/gdb.base/options.exp | 1 + gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 ++ gdb/testsuite/gdb.compile/compile-ops.exp | 1 + 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 | 2 ++ gdb/testsuite/lib/gdb.exp | 20 -------------------- 8 files changed, 12 insertions(+), 20 deletions(-) diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp index d10e7f8d66f..8fd968de1ad 100644 --- a/gdb/testsuite/gdb.base/options.exp +++ b/gdb/testsuite/gdb.base/options.exp @@ -31,6 +31,7 @@ # - thread apply # - taas +load_lib compile-support.exp load_lib completion-support.exp standard_testfile .c diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp index 4f671c6453f..07de52c3f67 100644 --- a/gdb/testsuite/gdb.compile/compile-ifunc.exp +++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +load_lib compile-support.exp + if {[skip_ifunc_tests]} { return 0 } diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp index 76f284f52f3..cff2f946c93 100644 --- a/gdb/testsuite/gdb.compile/compile-ops.exp +++ b/gdb/testsuite/gdb.compile/compile-ops.exp @@ -16,6 +16,7 @@ # Some coverage testing of DWARF operators for the compiler # integration. +load_lib compile-support.exp load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. diff --git a/gdb/testsuite/gdb.compile/compile-print.exp b/gdb/testsuite/gdb.compile/compile-print.exp index 051cfabe3ea..5d01c1a53d0 100644 --- a/gdb/testsuite/gdb.compile/compile-print.exp +++ b/gdb/testsuite/gdb.compile/compile-print.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +load_lib compile-support.exp + standard_testfile if { [prepare_for_testing "failed to prepare" "$testfile"] } { diff --git a/gdb/testsuite/gdb.compile/compile-setjmp.exp b/gdb/testsuite/gdb.compile/compile-setjmp.exp index 89a65fb0da1..c883b2bd570 100644 --- a/gdb/testsuite/gdb.compile/compile-setjmp.exp +++ b/gdb/testsuite/gdb.compile/compile-setjmp.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +load_lib compile-support.exp + standard_testfile .c compile-setjmp-mod.c if { [prepare_for_testing "failed to prepare" $testfile] } { diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.compile/compile-tls.exp index f9c9ee5e2f7..beffe7fd5be 100644 --- a/gdb/testsuite/gdb.compile/compile-tls.exp +++ b/gdb/testsuite/gdb.compile/compile-tls.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . */ +load_lib compile-support.exp + standard_testfile .c if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index f2515586c39..c712070872a 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +load_lib compile-support.exp + standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c set options {} diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 23e3cc0c2d4..5067e240507 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4195,26 +4195,6 @@ proc skip_libstdcxx_probe_tests {} { return [skip_libstdcxx_probe_tests_prompt "$gdb_prompt $"] } -# Return 1 if we should skip tests of the "compile" feature. -# This must be invoked after the inferior has been started. - -proc skip_compile_feature_tests {} { - global gdb_prompt - - set result 0 - gdb_test_multiple "compile code -- ;" "check for working compile command" { - "Could not load libcc1.*\r\n$gdb_prompt $" { - set result 1 - } - -re "Command not supported on this host\\..*\r\n$gdb_prompt $" { - set result 1 - } - -re "\r\n$gdb_prompt $" { - } - } - return $result -} - # Helper for gdb_is_target_* procs. TARGET_NAME is the name of the target # we're looking for (used to build the test name). TARGET_STACK_REGEXP # is a regexp that will match the output of "maint print target-stack" if