From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668424386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PsDapJXjdz9v9Nidhfb2CgSpunLFvSlNxSE3AyBQavI=; b=eJxjba36eiQ/AWPAvlFOmLiGGf/LWn/V4zY5prTMSZgoJuj3SAfduouu5Bk447IHqvKbXw QEUX1kGiV6iourEXQkmT/FDMoNIqydq+1mfkSm3LO6N3L2g34e+QmWIPbQxVI/IRWsfPn0 MMV4vaMn3QUni+cTiQ3Wwd4Q49o2CiE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668424386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PsDapJXjdz9v9Nidhfb2CgSpunLFvSlNxSE3AyBQavI=; b=YEH/426wO3nTD/TtPFPsdQG9uGYDr65NU3u4R0QBWUFthynn2uo9UrFiDJ6KTMLTl7KgIc D7eS+0rS7dxViyCw== 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 From: Tom de Vries 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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" - } } -- 2.35.3