From: Tom Tromey <tom@tromey.com>
To: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
Cc: Lancelot SIX <lancelot.six@amd.com>, lsix@lancelotsix.com
Subject: Re: [PATCH 3/3] gdb/selftest-arch: Make register_test_foreach_arch generate arch tests lazily
Date: Fri, 15 Apr 2022 11:52:57 -0600 [thread overview]
Message-ID: <87o812z11i.fsf@tromey.com> (raw)
In-Reply-To: <20220401130015.513187-4-lancelot.six@amd.com> (Lancelot SIX via Gdb-patches's message of "Fri, 1 Apr 2022 14:00:15 +0100")
>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:
Lancelot> To fix this, make register_test_foreach_arch register a lazy selftest
Lancelot> generator. This way when the test generator is eventually executed, all
Lancelot> architectures are registered and we do not have a dependency on the
Lancelot> order the initialize functions are executed in.
Lancelot> -void
Lancelot> -register_test_foreach_arch (const std::string &name,
Lancelot> - self_test_foreach_arch_function *function)
Lancelot> +static std::vector<selftest>
Lancelot> +foreach_arch_test_generator (const std::string &name,
Lancelot> + self_test_foreach_arch_function *function)
Lancelot> {
Is there some deep reason this has to return a vector?
It seems like the old code, just calling register_test directly here,
would also have been fine.
Tom
next prev parent reply other threads:[~2022-04-15 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 13:00 [PATCH 0/3] Fix register_test_foreach_arch Lancelot SIX
2022-04-01 13:00 ` [PATCH 1/3] gdbsupport/selftest: Replace for_each_selftest with an iterator_range Lancelot SIX
2022-04-01 13:00 ` [PATCH 2/3] gdbsupport/selftest: Allow lazy registration Lancelot SIX
2022-04-01 13:00 ` [PATCH 3/3] gdb/selftest-arch: Make register_test_foreach_arch generate arch tests lazily Lancelot SIX
2022-04-15 17:52 ` Tom Tromey [this message]
2022-04-15 18:10 ` Lancelot SIX
2022-04-15 18:50 ` Tom Tromey
2022-04-19 18:55 ` Simon Marchi
2022-04-19 21:10 ` Lancelot SIX
2022-04-12 8:17 ` [PING] [PATCH 0/3] Fix register_test_foreach_arch Lancelot SIX
2022-04-15 17:53 ` Tom Tromey
2022-04-19 8:18 ` Lancelot SIX
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=87o812z11i.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=lancelot.six@amd.com \
--cc=lsix@lancelotsix.com \
/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).