From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Add selftests run filtering
Date: Wed, 06 Sep 2017 15:25:00 -0000 [thread overview]
Message-ID: <0cc25dd0-4311-28e8-f0ca-443719354bed@redhat.com> (raw)
In-Reply-To: <1504612227-7159-1-git-send-email-simon.marchi@ericsson.com>
Sounds useful.
Patch looks fine to me. Nits and comments below.
I wonder whether we'll want to be able to do select tests
with e.g., a regexp instead of exact matching. If we do, then
the std::vector->std::map change would seem pointless.
Do you plan on adding some command to list the existing tests?
On 09/05/2017 12:50 PM, Simon Marchi wrote:
> static void
> maintenance_selftest (char *args, int from_tty)
> {
> - selftests::run_tests ();
> + selftests::selftests_results results_noarch = selftests::run_tests (args);
> + selftests::selftests_results results_arch = selftests::run_tests_with_arch (args);
Line too long? You could also shorten "selftests_results"
to e.g., "test_results", since the type is already in the
"selftests" namespace.
> + printf_filtered (_("Ran %d unit tests, %d failed\n"),
> + results_noarch.ran + results_arch.ran,
> + results_noarch.failed + results_arch.failed);
Wonder whether it'd make sense to implement operator+= for
selftests_results so that you'd write:
selftests::selftests_results results = selftests::run_tests (args);
results += selftests::run_tests_with_arch (args);
// etc.
printf_filtered (_("Ran %d unit tests, %d failed\n"),
results.ran, results.failed);
> _initialize_findvar (void)
> {
> #if GDB_SELF_TEST
> - selftests::register_test (selftests::findvar_tests::copy_integer_to_size_test);
> + selftests::register_test (
> + "copy_integer_to_size",
> + selftests::findvar_tests::copy_integer_to_size_test);
> #endif
In GNU style it's much more common to break the line
before "(", not after.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-06 15:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 11:51 Simon Marchi
2017-09-06 15:25 ` Pedro Alves [this message]
2017-09-06 18:38 ` Simon Marchi
2017-09-06 18:41 ` Simon Marchi
2017-09-06 18:44 ` Simon Marchi
2017-09-06 18:49 ` Pedro Alves
2017-09-06 21:21 ` [PATCH v2] " Simon Marchi
2017-09-07 15:09 ` Simon Marchi
2017-09-07 15:11 ` [PATCH v3] " Simon Marchi
2017-09-16 12:08 ` Simon Marchi
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=0cc25dd0-4311-28e8-f0ca-443719354bed@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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