gdb testsuit

Andrew Cagney cagney@gnu.org
Tue Feb 22 20:15:00 GMT 2005


Roopesh Kohad wrote:
> Dear All,
>       I am testing gdb on my company's subsystem and have GCC/GNU
> testsuite with us. I want to write few tests of my own and insert in
> the testsuite so that it runs like other tests i.e. I do not have to
> run and analyze them seperately. I tried but got caught in the maze of
> expect, Tcl, dejagnu. I only know following things:-
> 1. Runtest.exp is the main test driver.
> 2. The expect "test" source files are inside various directories in
> ~/testsuite/gdb.* directories.

Yes.

> What would be a step-by-step approach inserting a test case? 

By default all tests in those directories are run.  For the most part 
people create new testcases by copying old ones.  A good simple example 
is gdb.base/step.exp, I'd start with that, copy it to a new file, and go 
from there.  It can be run on its own using "cd build/gdb && make check 
RUNTESTFLAGS=newname.exp"

BTW, what exactly are you testing?  Improving GDB's test coverage is 
always a good thing.

Andrew



More information about the Gdb mailing list