From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Sandra Loosemore <sandra@codesourcery.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails
Date: Wed, 26 Sep 2018 11:50:00 -0000 [thread overview]
Message-ID: <yddmus44gvl.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> (Sandra Loosemore's message of "Tue, 25 Sep 2018 23:08:45 -0600")
Hi Sandra,
> gdb.base/gnu-ifunc.exp doesn't fail gracefully on targets that don't
> support this feature -- on nios2-linux-gnu I've seen TCL errors from trying
> to copy the nonexistent shared library that fails to build to the target.
I just tried the patch on Solaris which also doesn't have (and never
will have) ifunc support: unfortunately, there's still lots of noise in
gdb.sum:
Running /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc.exp ...
gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccyG.via.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-0.so
ld: warning: relocation error: 0xa: file /var/tmp//ccyG.via.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-0.so
warning: Text relocation remains referenced
against symbol offset in file
gnu_ifunc 0x55 /var/tmp//ccyG.via.o
gnu_ifunc 0x81 /var/tmp//ccyG.via.o
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=0: final_debug=0: failed to compile testcase
gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccD64Npa.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-1.so
ld: warning: relocation error: 0xa: file /var/tmp//ccD64Npa.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-1.so
warning: Text relocation remains referenced
against symbol offset in file
gnu_ifunc 0x55 /var/tmp//ccD64Npa.o
gnu_ifunc 0x81 /var/tmp//ccD64Npa.o
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=0: final_debug=1: failed to compile testcase
gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccLB0Wba.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-0.so
ld: warning: relocation error: 0xa: file /var/tmp//ccLB0Wba.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-0.so
warning: Text relocation remains referenced
against symbol offset in file
gnu_ifunc 0x55 /var/tmp//ccLB0Wba.o
gnu_ifunc 0x81 /var/tmp//ccLB0Wba.o
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=1: final_debug=0: failed to compile testcase
gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccxKrUka.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-1.so
ld: warning: relocation error: 0xa: file /var/tmp//ccxKrUka.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-1.so
warning: Text relocation remains referenced
against symbol offset in file
gnu_ifunc 0x55 /var/tmp//ccxKrUka.o
gnu_ifunc 0x81 /var/tmp//ccxKrUka.o
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=1: final_debug=1: failed to compile testcase
gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target
__typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver")));
^~~~~~~~~
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=0: final_debug=0: failed to compile testcase
gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target
__typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver")));
^~~~~~~~~
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=0: final_debug=1: failed to compile testcase
gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target
__typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver")));
^~~~~~~~~
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=1: final_debug=0: failed to compile testcase
gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target
__typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver")));
^~~~~~~~~
UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=1: final_debug=1: failed to compile testcase
PASS: gdb.base/gnu-ifunc.exp: static: static gnu_ifunc
=== gdb Summary ===
# of expected passes 1
# of untested testcases 8
It would be good to further reduce this.
Btw., shouldn't gdb.compile/compile-ifunc.exp get similar treatment?
> I see that ld/testsuite/ld-ifunc/ifunc.exp explicitly lists all the targets
> where IFUNC is expected to work, but it seemed more maintainable to me to
> tweak these gdb tests to pay attention to the return status from trying to
> build the test cases. Is this OK to commit?
gcc has gcc/testsuite/lib/target-supports.exp (check_ifunc_available)
instead, again a compile test instead of a hardcoded list. I wonder,
though, if it wouldn't be better to run such a check early in the two
gdb ifunc tests and skip them if that fails, rather than producing lots
of noise and UNSUPPORTED tests?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2018-09-26 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 5:08 Sandra Loosemore
2018-09-26 11:50 ` Rainer Orth [this message]
2018-09-27 2:20 ` Sandra Loosemore
2018-09-27 20:31 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yddmus44gvl.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gdb-patches@sourceware.org \
--cc=sandra@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox