This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFAv3 5/5] Add a test case for info args|functions|locals|variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
- From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- To: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 24 Oct 2018 00:05:09 +0200
- Subject: Re: [RFAv3 5/5] Add a test case for info args|functions|locals|variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
- References: <20180923214209.985-1-philippe.waroquiers@skynet.be> <20180923214209.985-6-philippe.waroquiers@skynet.be> <0f46cdb0-4c14-2d1b-9f5f-410b32c0915d@redhat.com>
On Mon, 2018-10-22 at 15:18 +0100, Pedro Alves wrote:
> On 09/23/2018 10:42 PM, Philippe Waroquiers wrote:
> > +############# test 'info args' in function setup.
> > +
> > +gdb_test "frame 1" ".* in setup .*" "set frame 1 for info args"
> > +
> > +# test name regexp matching all
> > +foreach_with_prefix cmd {
> > + "info args"
> > + "info args arg_"
> > + "info args g"
> > + "info args -- .*" } {
> > + gdb_test $cmd \
> > + [multi_line \
> > + "arg_c = 100 'd'" \
> > + "arg_i = 3" \
> > + "arg_j = 4" \
> > + ] \
> > + "info args"
> > +}
> > +
> > +# test name regexp or type regexp matching some
> > +foreach_with_prefix cmd {
> > + "info args -t int"
> > + "info args arg_[ij]"} {
> > + gdb_test $cmd \
> > + [multi_line \
> > + "arg_i = 3" \
> > + "arg_j = 4" \
> > + ] \
> > + "info args"
> > +}
>
> Duplicate test names.
>
> Consider sing with_test_prefix to wrap groups of tests.
Doing
make check RUNTESTFLAGS="gdb.base/info_qt.exp"
cat gdb/testsuite/gdb.sum | grep "PASS" | sort | uniq -c | sort -n
shows only unique test names (thanks to foreach_with_prefix I think).
Is the 'with_test_prefix' aimed at removing duplication ?
Or is it to have 4 groups wrapping together all the tests of
'info var'
'info local'
'info functions'
'info args'
?
Thanks
Philippe