This is the mail archive of the gdb-patches@sourceware.org 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: [RFAv3 5/5] Add a test case for info args|functions|locals|variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]


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



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