From: Yao Qi <qiyaoltc@gmail.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/8] Add self-test framework to gdb
Date: Thu, 28 Apr 2016 10:28:00 -0000 [thread overview]
Message-ID: <86wpnido3w.fsf@gmail.com> (raw)
In-Reply-To: <1461789279-15996-4-git-send-email-tom@tromey.com> (Tom Tromey's message of "Wed, 27 Apr 2016 14:34:34 -0600")
Tom Tromey <tom@tromey.com> writes:
Hi Tom,
this framework is sufficient in current needs, but I'd like to think
more about it because it is a framework, and more and more tests may use
it in the future.
> In development mode, test functions are registered with the self test
> module. A test function is just a function that does some checks, and
> aborts on failure. I chose this rather than something fancier because
> I think any such failure will require debugging anyhow.
In this framework, all unit tests are running in one GDB instance, so:
- if one test fails, the following tests won't be run, even they are
from different modules,
- tests may change the GDB state, and the following tests may be affected,
I'd like the framework to only run tests from one module in one gdb
instance, restart gdb after they are finished, and continue running
tests from other modules. For example, we have registered three self
tests in different modules,
register_self_test (rust_lex_tests);
register_self_test (breakpoint_tests);
register_self_test (linespec_tests);
In gdb.gdb/unittest.exp, we can get the list of self tests from
different modules via command "maint info selftest", like
$ (gdb) maint info selftest
rust_lex_tests
breakpoint_tests
linespec_tests
and the output can be saved in $list_of_tests, start a fresh gdb every
time, and execute these tests one by one, like
foreach test $list_of_tests {
gdb_start
gdb_test "maint selftest $test" "Ran $decimal unit tests"
gdb_exit
}
--
Yao (齐尧)
next prev parent reply other threads:[~2016-04-28 10:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 20:35 [PATCH v2 0/8] Add Rust language support Tom Tromey
2016-04-27 20:35 ` [PATCH v2 4/8] Add array start and end strings to generic_val_print_decorations Tom Tromey
2016-04-27 20:35 ` [PATCH v2 8/8] Rename OP_F90_RANGE to OP_RANGE Tom Tromey
2016-04-27 21:26 ` Pedro Alves
2016-04-27 20:35 ` [PATCH v2 7/8] Add Rust documentation Tom Tromey
2016-04-28 4:59 ` Eli Zaretskii
2016-04-27 20:35 ` [PATCH v2 2/8] Make gdb expression debugging handle OP_F90_RANGE Tom Tromey
2016-04-27 20:35 ` [PATCH v2 3/8] Add self-test framework to gdb Tom Tromey
2016-04-28 5:00 ` Eli Zaretskii
2016-04-28 10:28 ` Yao Qi [this message]
2016-04-29 15:13 ` Tom Tromey
2016-04-29 15:29 ` Yao Qi
2016-04-29 17:29 ` Doug Evans
2016-04-29 20:40 ` Tom Tromey
2016-04-29 20:54 ` Simon Marchi
2016-04-29 21:09 ` Tom Tromey
2016-05-03 15:58 ` Yao Qi
2016-04-27 20:35 ` [PATCH v2 6/8] Update gdb test suite for Rust Tom Tromey
2016-04-27 20:35 ` [PATCH v2 1/8] Fix latent yacc-related bug in gdb/Makefile.in init.c rule Tom Tromey
2016-04-27 20:36 ` [PATCH v2 5/8] Add support for the Rust language Tom Tromey
2016-04-27 21:27 ` [PATCH v2 0/8] Add Rust language support Pedro Alves
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=86wpnido3w.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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