From: Tom de Vries <tdevries@suse.de>
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 [thread overview]
Message-ID: <20221114111306.8833-3-tdevries@suse.de> (raw)
In-Reply-To: <20221114111306.8833-1-tdevries@suse.de>
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 <http://www.gnu.org/licenses/>.
-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
prev parent reply other threads:[~2022-11-14 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 11:13 [pushed 1/3] [gdb/testsuite] Set completions to unlimited in get_set_option_choices Tom de Vries
2022-11-14 11:13 ` [pushed 2/3] [gdb/testsuite] Handle with_set arch Tom de Vries
2022-11-14 11:13 ` Tom de Vries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221114111306.8833-3-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).