public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org, palves@redhat.com, eliz@gnu.org
Subject: Re: [PATCH v3] Add selftests run filtering
Date: Thu, 07 Sep 2017 15:11:00 -0000	[thread overview]
Message-ID: <73d0b31ae68d213e862d9d679511004a@polymtl.ca> (raw)
In-Reply-To: <1504796946-22276-1-git-send-email-simon.marchi@ericsson.com>

On 2017-09-07 17:09, Simon Marchi wrote:
> New in v3:
> 
> I realized I had forgotten help, news and doc, this patch adds those.
> 
> Actual commit log:
> 
> With the growing number of selftests, I think it would be useful to be
> able to run only a subset of the tests.  This patch associates a name 
> to
> each registered selftest.  It then allows doing something like:
> 
>   (gdb) maintenance selftest aarch64
>   Running self-tests.
>   Running selftest aarch64-analyze-prologue.
>   Running selftest aarch64-process-record.
>   Ran 2 unit tests, 0 failed
> 
> or with gdbserver:
> 
>   ./gdbserver --selftest=aarch64
> 
> In both cases, only the tests that contain "aarch64" in their name are
> ran.  To help validate that the tests you want to run were actually 
> ran,
> it also prints a message with the test name before running each test.
> 
> Right now, all the arch-dependent tests are registered as a single test
> of the selftests.  To be able to filter those too, I made them
> "first-class citizen" selftests.  The selftest type is an interface,
> with different implementations for "simple selftests" and "arch
> selftests".  The run_tests function simply iterates on that an invokes
> operator() on each test.
> 
> I changed the tests data structure from a vector to a map, because
> 
>   - it allows iterating in a stable (alphabetical) order
>   - it allows to easily verify if a test with a given name has been
>     registered, to avoid duplicates
> 
> There's also a new command "maintenance info selftests" that lists the
> registered selftests.

Arg, the subject should have said v3.

  reply	other threads:[~2017-09-07 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 11:51 [PATCH] " Simon Marchi
2017-09-06 15:25 ` Pedro Alves
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       ` Simon Marchi [this message]
2017-09-16 12:08         ` [PATCH v3] " 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=73d0b31ae68d213e862d9d679511004a@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).