From patchwork Mon Nov 14 11:13:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 60578 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 A6EFE385843D for ; Mon, 14 Nov 2022 11:13:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6EFE385843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668424412; bh=PsDapJXjdz9v9Nidhfb2CgSpunLFvSlNxSE3AyBQavI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MdMEIFvVFdjwSZdIU+VcHjMGjrNct3d8y0ngKxMKZmfAM9SK632Svy37uHnO1S1ts bVEbrYqNHyLM34TmGZSf7Z/tFgtv3/8i19kLl8xY21oKp+i4nDFtyDyBYltAS/QmB+ zpNOjReEGJD2yt+z1tsP76Z7fSCKlhoR+MkDzs/k= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 7D6833858C54 for ; Mon, 14 Nov 2022 11:13:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D6833858C54 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AE2C222781 for ; Mon, 14 Nov 2022 11:13:06 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9AC7C13A8C for ; Mon, 14 Nov 2022 11:13:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mFevJMIicmOFcgAAMHmgww (envelope-from ) for ; Mon, 14 Nov 2022 11:13:06 +0000 To: gdb-patches@sourceware.org Subject: [pushed 3/3] [gdb/testsuite] Run gdb.arch/ppc64-symtab-cordic.exp for --enable-targets=all Date: Mon, 14 Nov 2022 12:13:06 +0100 Message-Id: <20221114111306.8833-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221114111306.8833-1-tdevries@suse.de> References: <20221114111306.8833-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" While looking at test-case gdb.arch/ppc64-symtab-cordic.exp I realized that the test-case is too restrictive here: ... if {![istarget "powerpc*"] || ![is_lp64_target]} { verbose "Skipping powerpc64 separate debug file symtab test." return } ... and can also be run on x86_64-linux, if "set arch powerpc:common64" is supported, which is the case if we've build gdb with --enable-targets=all. Fix this by instead checking if powerpc:common64 is in the completion list for "set arch". This allows us to remove the 'untested "powerpc:common64 is not supported"'. While we're at it, clean up the test-case by using clean_restart. Tested on x86_64-linux. --- gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp index 9d02da739d6..5d2e1255d45 100644 --- a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp +++ b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp @@ -13,7 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {![istarget "powerpc*"] || ![is_lp64_target]} { +clean_restart + +set supported_archs [get_set_option_choices "set architecture"] +if { [lsearch -exact $supported_archs "powerpc:common64"] == -1 } { verbose "Skipping powerpc64 separate debug file symtab test." return } @@ -34,10 +37,6 @@ if {[catch "system \"bzip2 -dc ${kodebugbz2file} >${kodebugfile}\""] != 0} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir - # This test won't work properly if system debuginfo is installed. # Test message is suppressed by "" as otherwise we could print PASS+UNTESTED # result to gdb.sum making a false feeling the issue has been tested. @@ -50,7 +49,4 @@ gdb_test_multiple $test $test { -re "\r\nThe target architecture is set to \"auto\" \\(currently \"powerpc:common64\"\\)\.\r\n$gdb_prompt $" { pass $test } - -re "\r\nThe target architecture is set to \"auto\" \\(currently \".*\"\\)\.\r\n$gdb_prompt $" { - untested "powerpc:common64 is not supported" - } }