This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] gdb.server testcases (resend)


On Mon, May 16, 2005 at 12:13:17PM -0500, Manoj Iyer wrote:
> 
> In my previous email I missed the changelog. Here is my complete patch.
> Please review and comment.
> 
> 2005-05-16  Manoj Iyer  <manjo@austin.ibm.com>
> 
>         * gdb.server/server-run.exp: added testcases.
>         * gdb.server/server.c: added nested function call to test
>           backtrace.

That's not a changelog; it does not describe what has changed.  Please
follow the conventions for C code when changing C files in the
testsuite; each function needs its own entry, for instance.

You've changed the indentation in server.c, away from the GNU style.
It's not as important to maintain GNU Coding Standards in the
testsuite, but please don't ignore it without a reason.

> +# test setting a breakpoint

Comments are full sentences, start with capital letters, and end with
periods.

>  gdb_breakpoint main
> -gdb_test "continue" "Breakpoint.* main .*" "continue to main"
> +
> +gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\], main.*at .*$srcfile:\[0-9\]+.*"
> +
> +# test if list command displays source code
> +gdb_test "list" ".*main.*\{.*\}"
> +
> +# set breakpoint at a function and test backtrace command
> +gdb_test "break function3" "Breakpoint 2 at.*file .*$srcfile, line \[0-9\]+."
> +
> +gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\]+, function3.*at.*$srcfile:\[0-9\]+.*"

You'll need to give names to tests; otherwise this test is going to
report "PASS: gdb.server/server-run.exp: continue" multiple times.

Manoj, before you revise the patch again, could you explain why you
want to add these tests?  It is possible to run the entire testsuite
using gdbserver if you want to specifically validate gdbserver; the
purpose of the gdb.server directory is:

1. To make sure that minimal remote protocol support is not
accidentally broken by people working on native debuggers.

2. (Someday) to test gdbserver-specific features, like gdbserver
--attach.

Do these tests add value to #1?  We're already testing that we can
reach main; on a native configuration that tests breakpoints,
continuing, and single-stepping (for the dynamic linker breakpoints).

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]