This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/8] Add self-test framework to gdb
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 27 Apr 2016 12:40:23 +0100
- Subject: Re: [PATCH 4/8] Add self-test framework to gdb
- Authentication-results: sourceware.org; auth=none
- References: <1461725371-17620-1-git-send-email-tom at tromey dot com> <1461725371-17620-5-git-send-email-tom at tromey dot com>
On 04/27/2016 03:49 AM, Tom Tromey wrote:
> I wanted to unit test the Rust lexer, so I added a simple unit testing
> command to gdb.
>
> The intent is that self tests will only be compiled into gdb in
> development mode. In release mode they simply won't exist. So, this
> exposes $development to C code as GDB_SELF_TEST.
>
> 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.
IIUC, it'll internal error, not abort/crash directly, right?
> Then this adds a new "maint selftest" command which invokes the test
> functions, and a new dejagnu test case that invokes it.
Looks good to me.
Could you include a NEWS change for "maintenance selftest" ?
Thanks,
Pedro Alves