This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: tests for MI commands
...
> > > We can discuss this *after* you either:
> > > a) Fixed the test failures.
> > >
> > > b) Backed out your patch.
> >
> > I'd like to do a) by removing the mi2-*.exp files ;-). There doesn't seem
> > much point in making a load of changes if we are going to just remove the
> > files afterwards.
>
> Obviously this is not uncontroversial, so it is not appropriate as a
> short term solution.
Its not that controversial as remove in CVS just means move to the Attic
directory: nothing is lost and it can always be recovered, if necessary.
...
> > Let's remember that the testsuite is there to prevent regressions in GDB
> > and not as an end in itself. Presumably the focus should be on having
> > the right tests in the suite and not just on ensuring that everything
> > passes.
>
> I will echo everyone else's comments here - in particular Stan's. Lots
> of people run the testsuite, either manually during development or in
> automated test harnesses, and in either case there's someone who has to
> look into the new failures when they appear. Leaving things broken is
> a problem.
I never intended to leave things broken. You have asked me to fix the
failures, and I will, but I'm not sure if that means submit further patches to
the mailing list or commit appropriate fixes. Based on Mark Kettenis' e-mail,
I attach a simple fix for mi-var-child.exp. Does it work in your case? I
also suggested removing the duplicate test for in mi-var-display.exp (which
presumably existed before mi-var-child.exp was created). Can I commit these
changes?
Nick
2005-07-28 Nick Roberts <nickrob@snap.net.nz>
* gdb.mi/mi-var-child.exp: Allow struct_declarations.character to be
uninitialized.
*** gdb.mi/mi-var-child.exp.~1.18.~ 2005-07-27 14:12:06.000000000 +1200
--- gdb.mi/mi-var-child.exp 2005-07-28 13:29:35.000000000 +1200
*************** mi_gdb_test "-var-list-children --all-va
*** 866,872 ****
"listing of names and values of children"
mi_gdb_test "-var-list-children --simple-values struct_declarations" \
! "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",value=\"123\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",value=\"0 '\\\\\\\\0'\",type=\"char\"\},child=\{name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",value=\"$hex \\\\\"hello\\\\\"\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",value=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"12\",type=\"long int \\\[12\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",value=\"$hex <nothing>\",type=\"void \\(\\*\\)\\(void\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{...\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{...\}\"\}\\\]" \
"listing of children, simple types: names, type and values, complex types: names and types"
# Delete all variables
--- 866,872 ----
"listing of names and values of children"
mi_gdb_test "-var-list-children --simple-values struct_declarations" \
! "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",value=\"123\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",value=\"0 '\\\\\\\\$decimal'\",type=\"char\"\},child=\{name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",value=\"$hex \\\\\"hello\\\\\"\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",value=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"12\",type=\"long int \\\[12\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",value=\"$hex <nothing>\",type=\"void \\(\\*\\)\\(void\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{...\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{...\}\"\}\\\]" \
"listing of children, simple types: names, type and values, complex types: names and types"
# Delete all variables