From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id AC34F3858C52; Mon, 14 Nov 2022 11:12:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC34F3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668424358; bh=9/hdPZcGtql0J4rPVWhTuCjbKbYWOLSWL3nvkYHcd2c=; h=From:To:Subject:Date:From; b=MMd55kr3kYWh77wk43PPJPwYtrRU4HHJsX+xjZmad/rBv3EPYUOQ77VRO0nIBVKzL uuUCSsan7A1kmylTwg9DPN75waz4MWurQlmvRaOxbOzzkj8idPaOyeDI3UnLQClEFA le+8uER7tH5mYpRLQA12xs28qUv9mxc4LPV4XgXA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Run gdb.arch/ppc64-symtab-cordic.exp for --enable-targets=all X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 7f21d259bcefda58b701af01cc6a749c8133fb2b X-Git-Newrev: 3cbf5fdfe4f56f6a85d0228ea679ef5581fba78e Message-Id: <20221114111238.AC34F3858C52@sourceware.org> Date: Mon, 14 Nov 2022 11:12:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3cbf5fdfe4f5= 6f6a85d0228ea679ef5581fba78e commit 3cbf5fdfe4f56f6a85d0228ea679ef5581fba78e Author: Tom de Vries Date: Mon Nov 14 12:12:19 2022 +0100 [gdb/testsuite] Run gdb.arch/ppc64-symtab-cordic.exp for --enable-targe= ts=3Dall =20 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= =3Dall. =20 Fix this by instead checking if powerpc:common64 is in the completion l= ist for "set arch". =20 This allows us to remove the 'untested "powerpc:common64 is not support= ed"'. =20 While we're at it, clean up the test-case by using clean_restart. =20 Tested on x86_64-linux. Diff: --- 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 . =20 -if {![istarget "powerpc*"] || ![is_lp64_target]} { +clean_restart + +set supported_archs [get_set_option_choices "set architecture"] +if { [lsearch -exact $supported_archs "powerpc:common64"] =3D=3D -1 } { verbose "Skipping powerpc64 separate debug file symtab test." return } @@ -34,10 +37,6 @@ if {[catch "system \"bzip2 -dc ${kodebugbz2file} >${kode= bugfile}\""] !=3D 0} { return -1 } =20 -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+UNTEST= ED # 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 \"pow= erpc: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" - } }