This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Try both make_relative_prefix{,ignore_links} for relocatability
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org
- Date: Tue, 29 Sep 2015 12:01:08 +0100
- Subject: Re: [PATCH 2/2] Try both make_relative_prefix{,ignore_links} for relocatability
- Authentication-results: sourceware.org; auth=none
- References: <001a113803b2aff208051d215382 at google dot com>
Hi Doug,
FWIW, I see no issue with installed testing.
On 08/12/2015 07:24 PM, Doug Evans wrote:
> +# Test gdb's handling of relocatability.
> +# This only works if gdb was configured to be relocatable.
> +# We can't rebuild gdb just for this test, but we can check whether
> +# the built gdb is relocatable and if so then run the tests.
> +
> +# It's not clear what systems this test will work on.
> +# For now pick the ones we know will work.
> +if {![istarget *-*-linux*]
> + || [is_remote host]} {
> + return 0
> +}
IIUC, this is a host property, not target property, so sounds
like that should be ishost. IOW, depends on where gdb runs, not
what target it was configured to debug.
But, how about dropping the Linux filter altogether for now?
I think not exposing the test to other hosts/targets is a recipe for never
relaxing the check in the future either, because nobody will be looking
for tests to enable on other hosts. I favor instead letting new tests
run on all systems, and then selectively skip on those which we then
find it can't work (and then with a comment on why it can't work).
> + set test "make install"
> + if { $result != 0 } {
> + fail $test
> + } else {
> + pass $test
> + }
Note you can use gdb_assert instead of this if/else/fail/pass
sequence.
Thanks,
Pedro Alves