[PATCH v2 3/8] Add self-test framework to gdb

Doug Evans dje@google.com
Fri Apr 29 17:29:00 GMT 2016


On Fri, Apr 29, 2016 at 8:29 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> Tom Tromey <tom@tromey.com> writes:
>
>> It would also be possible to use exceptions rather than asserts.
>> Then the current single command could be kept, since gdb wouldn't abort
>> on failure.
>>
>> Let me know which you'd prefer.
>
> Using exceptions is fine to me.

On a separate note, where do we, in the long term, want tests to live?

I'm wondering about the scalability of having tests in the same source file
reducing the readability, and whether we want conventions to avoid this.
I'm not saying 100% of tests have to, say, live in separate files
(e.g. foo.c tests -> foo-test.c or some such).
I'm just paranoid about having a repeat of the massive readability reduction
from the adding of record support to *-tdep.c files.

[Imagine how the sources will look 5 years from now.]



More information about the Gdb-patches mailing list