From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [RFC][gdb/testsuite] Register test for each arch separately in register_test_foreach_arch
Date: Mon, 20 Sep 2021 12:01:29 -0400 [thread overview]
Message-ID: <1786b296-3fb6-881e-2e08-f030a0d5a513@polymtl.ca> (raw)
In-Reply-To: <20210913154034.GA3115@delia.home>
On 2021-09-13 11:40 a.m., Tom de Vries via Gdb-patches wrote:
> Hi,
>
> In gdb/disasm-selftests.c we have:
> ...
> selftests::register_test_foreach_arch ("print_one_insn",
> selftests::print_one_insn_test);
> ...
> and we get:
> ...
> $ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
> | grep ^Running
> Running selftest print_one_insn.
> $
> ...
>
> Change the semantics register_test_foreach_arch such that a version of
> print_one_insn is registered for each architecture, such that we have:
> ...
> $ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
> | grep ^Running
> Running selftest print_one_insn::A6.
> Running selftest print_one_insn::A7.
> Running selftest print_one_insn::ARC600.
> ...
> $
> ...
>
> This makes it f.i. possible to do:
> ...
> $ gdb -q -batch a.out -ex "maint selftest print_one_insn::armv8.1-m.main"
> Running selftest print_one_insn::armv8.1-m.main.
> Self test failed: self-test failed at src/gdb/disasm-selftests.c:165
> Ran 1 unit tests, 1 failed
> ...
>
> Currently this runs into a bfd problem, filed at PR28336 - "bfd printable arch
> names not unique" ( https://sourceware.org/bugzilla/show_bug.cgi?id=28336 ).
>
> Any comments?
I think the idea is good. It's still possible to run the test for all
arches, since the argument to "maint selftest" can match just a subset
of the test name. So we don't lose anything. The problem with PR28336
makes it so that we try to register tests with duplicate names, and that
asserts?
Simon
next prev parent reply other threads:[~2021-09-20 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 15:40 Tom de Vries via Gdb-patches
2021-09-20 16:01 ` Simon Marchi via Gdb-patches [this message]
2021-09-20 18:07 ` Tom de Vries via Gdb-patches
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=1786b296-3fb6-881e-2e08-f030a0d5a513@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tdevries@suse.de \
/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