This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 8/8] Tests for validate symbol file using build-id
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Aleksandar Ristovski <ARistovski at qnx dot com>
- Date: Wed, 19 Mar 2014 23:33:07 +0100
- Subject: Re: [PATCH v4 8/8] Tests for validate symbol file using build-id
- Authentication-results: sourceware.org; auth=none
- References: <20140302195248 dot 10290 dot 22958 dot stgit at host1 dot jankratochvil dot net> <20140302195349 dot 10290 dot 47187 dot stgit at host1 dot jankratochvil dot net> <531D332F dot 10309 at codesourcery dot com>
On Mon, 10 Mar 2014 04:36:15 +0100, Yao Qi wrote:
> On 03/03/2014 03:53 AM, Jan Kratochvil wrote:
> > gdb/testsuite/
> > 2014-02-26 Aleksandar Ristovski <aristovski@qnx.com
> >
> > Tests for validate symbol file using build-id.
> > * gdb.base/solib-mismatch-lib.c: New file.
> > * gdb.base/solib-mismatch-libmod.c: New file.
> > * gdb.base/solib-mismatch.c: New file.
> > * gdb.base/solib-mismatch.exp: New file.
>
> Since the test is about GDBserver, so IWBN to move them
> testsuite/gdb.server/ directory.
Done.
> > +if ![is_remote target] {
> > + untested "only gdbserver supports build-id reporting"
> > + return -1
> > +}
> > +if { [board_info target sockethost] != "localhost:" } {
> > + # The testcase below could be fixed for remote targets.
> > + untested "only gdbserver on localhost is supported (found [board_info target sockethost])"
> > + return -1
> > +}
>
> I don't figure out why this test should be only performed against
> native gdbserver.
If you ask why I have removed the linux-nat support as it regressed linux-nat
functionality reading wrong build-id for local files, described in:
https://sourceware.org/ml/gdb-patches/2014-02/msg00842.html
If you ask why it does not work for gdbserver running on a different computer
- that could be working but I have never run such a setup, I do not think
I would get all the uploads/downloads right without testing and I just did not
want to put more time into setting it up and fixing all.
But in the meantime upon other discussions this '!= "localhost:"' condition
has been removed, the testcase is apparently broken with different-filesystem
gdbserver but someone occasionally fixing up such testcases should find it
more easier than if the testcase disable was present there.
> > +file delete -force -- "${binlibfiledirrun}"
> > +file mkdir "${binlibfiledirrun}"
> > +
>
> If test is only run in native-gdbserver, these file operations are fine,
> otherwise, we may use "rmeote_file target delete" and
> "remote_exec target mkdir" here.
Discussed above.
> > + gdb_test_no_output "set solib-search-path \"${binlibfiledirgdb}\"" ""
> > + if { [gdb_test "cd ${binlibfiledirgdb}" "" ""] != 0 } {
> > + untested "cd ${binlibfiledirgdb}"
>
> Caller of proc solib_matching_test emits UNTESTED, so don't have to do
> it again inside sobli_matching_test.
I have rather reworked it a bit now with with_test_prefix() instead of the
extra 'msg' parameter.
Thanks,
Jan